mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-10 05:34:54 +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 */
|
||||
public $enabled;
|
||||
|
||||
public static function create(bool $enabled) : self{
|
||||
$result = new self;
|
||||
$result->enabled = $enabled;
|
||||
return $result;
|
||||
}
|
||||
|
||||
protected function decodePayload(PacketSerializer $in) : void{
|
||||
$this->enabled = $in->getBool();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user