13declare(strict_types=1);
15namespace pocketmine\network\mcpe\protocol;
21 public const NETWORK_ID = ProtocolInfo::UPDATE_PLAYER_GAME_TYPE_PACKET;
24 private int $gameMode;
25 private int $playerActorUniqueId;
31 public static function create(
int $gameMode,
int $playerActorUniqueId,
int $tick) : self{
33 $result->gameMode = $gameMode;
34 $result->playerActorUniqueId = $playerActorUniqueId;
35 $result->tick = $tick;
39 public function getGameMode() : int{ return $this->gameMode; }
41 public function getPlayerActorUniqueId() : int{ return $this->playerActorUniqueId; }
43 public function getTick() : int{ return $this->tick; }
46 $this->gameMode = $in->getVarInt();
52 $out->putVarInt($this->gameMode);
53 $out->putActorUniqueId($this->playerActorUniqueId);
58 return $handler->handleUpdatePlayerGameType($this);
static create(int $gameMode, int $playerActorUniqueId, int $tick)
handle(PacketHandlerInterface $handler)
encodePayload(PacketSerializer $out)
decodePayload(PacketSerializer $in)
putUnsignedVarInt(int $v)