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