mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-13 01:09:44 +00:00
SetDefaultGameTypePacket: added ::create()
not using this yet, but it was in my workspace and it might come in useful
This commit is contained in:
parent
e8d9acb59f
commit
44b7239847
@ -33,6 +33,12 @@ class SetDefaultGameTypePacket extends DataPacket implements ClientboundPacket,
|
||||
/** @var int */
|
||||
public $gamemode;
|
||||
|
||||
public static function create(int $gameMode) : self{
|
||||
$result = new self;
|
||||
$result->gamemode = $gameMode;
|
||||
return $result;
|
||||
}
|
||||
|
||||
protected function decodePayload() : void{
|
||||
$this->gamemode = $this->getVarInt();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user