Skip to content

Commit

Permalink
Say which protocol version when client is outdated
Browse files Browse the repository at this point in the history
  • Loading branch information
Snowiiii committed Aug 14, 2024
1 parent 2d3990b commit 5f8cbdb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pumpkin/src/client/client_packet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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}"));
Expand Down

0 comments on commit 5f8cbdb

Please sign in to comment.