Say which protocol version when client is outdated
This commit is contained in:
parent
2d3990bfa6
commit
5f8cbdbba6
@ -38,7 +38,8 @@ impl Client {
|
|||||||
self.connection_state = handshake.next_state;
|
self.connection_state = handshake.next_state;
|
||||||
if self.connection_state == ConnectionState::Login {
|
if self.connection_state == ConnectionState::Login {
|
||||||
if self.protocol_version < CURRENT_MC_PROTOCOL as i32 {
|
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;
|
return;
|
||||||
} else if self.protocol_version > CURRENT_MC_PROTOCOL as i32 {
|
} 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}"));
|
self.kick(&format!("Server outdated, Server uses Minecraft {CURRENT_MC_VERSION}, Protocol {CURRENT_MC_PROTOCOL}"));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user