Skip to content

Commit 6e5759b

Browse files
committed
Made incompatible client disconnect messages more informative
1 parent 03d3e59 commit 6e5759b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/pocketmine/Player.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1972,13 +1972,13 @@ public function handleLogin(LoginPacket $packet) : bool{
19721972

19731973
if($packet->protocol !== ProtocolInfo::CURRENT_PROTOCOL){
19741974
if($packet->protocol < ProtocolInfo::CURRENT_PROTOCOL){
1975-
$message = "disconnectionScreen.outdatedClient";
19761975
$this->sendPlayStatus(PlayStatusPacket::LOGIN_FAILED_CLIENT, true);
19771976
}else{
1978-
$message = "disconnectionScreen.outdatedServer";
19791977
$this->sendPlayStatus(PlayStatusPacket::LOGIN_FAILED_SERVER, true);
19801978
}
1981-
$this->close("", $message, false);
1979+
1980+
//This pocketmine disconnect message will only be seen by the console (PlayStatusPacket causes the messages to be shown for the client)
1981+
$this->close("", $this->server->getLanguage()->translateString("pocketmine.disconnect.incompatibleProtocol", [$packet->protocol]), false);
19821982

19831983
return true;
19841984
}

0 commit comments

Comments
 (0)