Don't clone PlayerConfig
This commit is contained in:
1 parent
92a3f6cb14
commit
f40eb85c53
3 files changed
+3
-4
No files matched your search
@@ -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,
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
@@ -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(
|
||||||
|
|||||||
Reference in new issue
Block a user