Don't clone PlayerConfig
This commit is contained in:
parent
92a3f6cb14
commit
f40eb85c53
@ -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,
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user