diff --git a/minecraft-server/src/entities/player.rs b/minecraft-server/src/entities/player.rs index ba892605..e230f3df 100644 --- a/minecraft-server/src/entities/player.rs +++ b/minecraft-server/src/entities/player.rs @@ -192,8 +192,10 @@ impl Handler { use ServerMessage::*; match message { Tick(tick_id) => { - let span = info_span!("player tick"); - let _enter = span.enter(); + #[cfg(feature = "tracing")] { + let span = info_span!("player tick"); + let _enter: tracing::span::Entered<'_> = span.enter(); + } if tick_id % (20*10) == 0 { self.send_packet(PlayClientbound::KeepAlive { keep_alive_id: tick_id as u64 }).await;