← Back to Index

UpdatePlayerGameTypePacket (151)

The server will send this back to all clients on receipt of the SetPlayerGameTypePacket so that cached game type and permissions flags in mLevel on all clients is kept up to date.
Field Name Type Field Index Description
Player Game Type (Required) varint32 0
Enum Values:
Index Value
0 Undefined
1 Survival
2 Creative
3 Adventure
4 Default
5 Spectator
6 WorldDefault
Target player (Required) ActorUniqueID 1

ActorUniqueID

Field Name Type Field Index Description
Actor Unique ID (Required) varint64 0
Tick (Required) PlayerInputTick 2 Most relevant to supply for transitioning into and out of spectator while in motion

PlayerInputTick

Field Name Type Field Index Description
Input tick (Required) varuint64 0 In server authoritative movement mode the client supplies this in PlayerAuthInputPacket. For any client-bound packets containing a tick, the server should supply the tick value corresponding to the most recently processed PlayerAuthInputPacket. This allows the client to adjust any client predictions made while the packet was in flight. If the packet is being sent to the client but not relating to data of the player or a client-predicted vehicle, it can be zero. It is also acceptable to specify zero for players, although this may lead to minor visual flickers and less smooth application of CorrectPlayerMovePredictionPacket.