From 5f8cbdbba6f05ec8b9bfc4eedf7b26bb6dccde30 Mon Sep 17 00:00:00 2001 From: Snowiiii Date: Wed, 14 Aug 2024 11:48:15 +0200 Subject: [PATCH] Say which protocol version when client is outdated --- pumpkin/src/client/client_packet.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pumpkin/src/client/client_packet.rs b/pumpkin/src/client/client_packet.rs index 7fab5949..edc5988a 100644 --- a/pumpkin/src/client/client_packet.rs +++ b/pumpkin/src/client/client_packet.rs @@ -38,7 +38,8 @@ impl Client { self.connection_state = handshake.next_state; if self.connection_state == ConnectionState::Login { if self.protocol_version < CURRENT_MC_PROTOCOL as i32 { - self.kick(&format!("Client outdated, Server uses Minecraft {CURRENT_MC_VERSION}, Protocol {CURRENT_MC_PROTOCOL}")); + let protocol = self.protocol_version; + self.kick(&format!("Client outdated ({protocol}), Server uses Minecraft {CURRENT_MC_VERSION}, Protocol {CURRENT_MC_PROTOCOL}")); return; } else if self.protocol_version > CURRENT_MC_PROTOCOL as i32 { self.kick(&format!("Server outdated, Server uses Minecraft {CURRENT_MC_VERSION}, Protocol {CURRENT_MC_PROTOCOL}"));