Don't clone PlayerConfig

This commit is contained in:
Snowiiii 2024-08-24 20:09:56 +02:00
parent 92a3f6cb14
commit f40eb85c53
3 changed files with 3 additions and 4 deletions

View File

@ -35,7 +35,6 @@ mod client_packet;
mod container;
pub mod player_packet;
#[derive(Clone)]
pub struct PlayerConfig {
pub locale: String, // 16
pub view_distance: i8,

View File

@ -200,13 +200,13 @@ impl Player {
}
}
#[derive(FromPrimitive, Clone)]
#[derive(FromPrimitive)]
pub enum Hand {
Main,
Off,
}
#[derive(FromPrimitive, Clone)]
#[derive(FromPrimitive)]
pub enum ChatMode {
Enabled,
CommandsOnly,

View File

@ -282,7 +282,7 @@ impl Server {
))
}
// entity meta data
if let Some(config) = player.client.config.clone() {
if let Some(config) = player.client.config.as_ref() {
self.broadcast_packet(
player,
&CSetEntityMetadata::new(