From 6e5759b1d1a31f7c0c42cb7fcd2081ca7224f249 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Mon, 25 Sep 2017 14:30:11 +0100 Subject: [PATCH] Made incompatible client disconnect messages more informative --- src/pocketmine/Player.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index 673d54c6ac2..ce40e04fb93 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -1972,13 +1972,13 @@ public function handleLogin(LoginPacket $packet) : bool{ if($packet->protocol !== ProtocolInfo::CURRENT_PROTOCOL){ if($packet->protocol < ProtocolInfo::CURRENT_PROTOCOL){ - $message = "disconnectionScreen.outdatedClient"; $this->sendPlayStatus(PlayStatusPacket::LOGIN_FAILED_CLIENT, true); }else{ - $message = "disconnectionScreen.outdatedServer"; $this->sendPlayStatus(PlayStatusPacket::LOGIN_FAILED_SERVER, true); } - $this->close("", $message, false); + + //This pocketmine disconnect message will only be seen by the console (PlayStatusPacket causes the messages to be shown for the client) + $this->close("", $this->server->getLanguage()->translateString("pocketmine.disconnect.incompatibleProtocol", [$packet->protocol]), false); return true; }