mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-13 09:19:42 +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 */
|
/** @var int */
|
||||||
public $gamemode;
|
public $gamemode;
|
||||||
|
|
||||||
|
public static function create(int $gameMode) : self{
|
||||||
|
$result = new self;
|
||||||
|
$result->gamemode = $gameMode;
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
protected function decodePayload() : void{
|
protected function decodePayload() : void{
|
||||||
$this->gamemode = $this->getVarInt();
|
$this->gamemode = $this->getVarInt();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user