mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-11 05:55:33 +00:00
SetCommandsEnabledPacket: added ::create()
This commit is contained in:
parent
ca6a892834
commit
869c9dabf1
@ -33,6 +33,12 @@ class SetCommandsEnabledPacket extends DataPacket implements ClientboundPacket{
|
|||||||
/** @var bool */
|
/** @var bool */
|
||||||
public $enabled;
|
public $enabled;
|
||||||
|
|
||||||
|
public static function create(bool $enabled) : self{
|
||||||
|
$result = new self;
|
||||||
|
$result->enabled = $enabled;
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
protected function decodePayload(PacketSerializer $in) : void{
|
protected function decodePayload(PacketSerializer $in) : void{
|
||||||
$this->enabled = $in->getBool();
|
$this->enabled = $in->getBool();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user