mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 08:44:01 +00:00
DisconnectPacket: fix decoding
This commit is contained in:
parent
d80c471ae1
commit
295016cbc1
@ -34,7 +34,7 @@ class DisconnectPacket extends DataPacket{
|
||||
/** @var bool */
|
||||
public $hideDisconnectionScreen = false;
|
||||
/** @var string */
|
||||
public $message;
|
||||
public $message = "";
|
||||
|
||||
public function canBeSentBeforeLogin() : bool{
|
||||
return true;
|
||||
@ -42,7 +42,9 @@ class DisconnectPacket extends DataPacket{
|
||||
|
||||
protected function decodePayload(){
|
||||
$this->hideDisconnectionScreen = $this->getBool();
|
||||
$this->message = $this->getString();
|
||||
if(!$this->hideDisconnectionScreen){
|
||||
$this->message = $this->getString();
|
||||
}
|
||||
}
|
||||
|
||||
protected function encodePayload(){
|
||||
|
Loading…
x
Reference in New Issue
Block a user