mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 00:07:30 +00:00
LoginPacket: protocol cannot be NULL
This commit is contained in:
parent
0766952f39
commit
8da7e789fd
@ -1898,7 +1898,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
||||
}
|
||||
|
||||
//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 ?? "unknown"]), false);
|
||||
$this->close("", $this->server->getLanguage()->translateString("pocketmine.disconnect.incompatibleProtocol", [$packet->protocol]), false);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ class LoginPacket extends DataPacket{
|
||||
}
|
||||
|
||||
public function mayHaveUnreadBytes() : bool{
|
||||
return $this->protocol !== null and $this->protocol !== ProtocolInfo::CURRENT_PROTOCOL;
|
||||
return $this->protocol !== ProtocolInfo::CURRENT_PROTOCOL;
|
||||
}
|
||||
|
||||
protected function decodePayload(){
|
||||
@ -92,7 +92,7 @@ class LoginPacket extends DataPacket{
|
||||
}
|
||||
|
||||
$logger = MainLogger::getLogger();
|
||||
$logger->debug(get_class($e) . " was thrown while decoding connection request in login (protocol version " . ($this->protocol ?? "unknown") . "): " . $e->getMessage());
|
||||
$logger->debug(get_class($e) . " was thrown while decoding connection request in login (protocol version $this->protocol): " . $e->getMessage());
|
||||
foreach(Utils::printableTrace($e->getTrace()) as $line){
|
||||
$logger->debug($line);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user