diff --git a/pumpkin-protocol/src/server/play/s_set_creative_slot.rs b/pumpkin-protocol/src/server/play/s_set_creative_slot.rs index 8f1c7a522..ce0b7490d 100644 --- a/pumpkin-protocol/src/server/play/s_set_creative_slot.rs +++ b/pumpkin-protocol/src/server/play/s_set_creative_slot.rs @@ -3,7 +3,6 @@ use pumpkin_macros::packet; use crate::slot::Slot; #[derive(serde::Deserialize, Debug)] -#[allow(dead_code)] #[packet(0x32)] pub struct SSetCreativeSlot { pub slot: i16, diff --git a/pumpkin/src/client/client_packet.rs b/pumpkin/src/client/client_packet.rs index 442565b5b..d93e72a30 100644 --- a/pumpkin/src/client/client_packet.rs +++ b/pumpkin/src/client/client_packet.rs @@ -36,7 +36,7 @@ impl Client { dbg!("handshake"); self.protocol_version = handshake.protocol_version.0; self.connection_state = handshake.next_state; - if self.connection_state == ConnectionState::Login { + if self.connection_state != ConnectionState::Status { let protocol = self.protocol_version; match protocol.cmp(&(CURRENT_MC_PROTOCOL as i32)) { std::cmp::Ordering::Less => { @@ -65,7 +65,7 @@ impl Client { } pub fn handle_login_start(&mut self, server: &mut Server, login_start: SLoginStart) { - dbg!("login start"); + log::debug!("login start, State {:?}", self.connection_state); if !Self::is_valid_player_name(&login_start.name) { self.kick("Invalid characters in username"); diff --git a/pumpkin/src/client/mod.rs b/pumpkin/src/client/mod.rs index 4744594e8..f90b97b7f 100644 --- a/pumpkin/src/client/mod.rs +++ b/pumpkin/src/client/mod.rs @@ -180,7 +180,9 @@ impl Client { packet.id.0 ), }, - pumpkin_protocol::ConnectionState::Login => match packet.id.0 { + // TODO: Check config if transfer is enabled + pumpkin_protocol::ConnectionState::Login + | pumpkin_protocol::ConnectionState::Transfer => match packet.id.0 { SLoginStart::PACKET_ID => { self.handle_login_start(server, SLoginStart::read(bytebuf).unwrap()) }