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; mod container;
pub mod player_packet; pub mod player_packet;
#[derive(Clone)]
pub struct PlayerConfig { pub struct PlayerConfig {
pub locale: String, // 16 pub locale: String, // 16
pub view_distance: i8, pub view_distance: i8,

View File

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

View File

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