1
0
mirror of https://github.com/Mojang/bedrock-protocol-docs.git synced 2025-11-06 06:35:12 +00:00
Files
bedrock-protocol-docs/json/SetPlayerGameTypePacket.json

50 lines
1.8 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "1837652280",
"x-format-version": "MISSING VERSION",
"x-minecraft-version": "1.21.120",
"x-protocol-version": 859,
"definitions": {
"2923560331": {
"title": "SetPlayerGameTypePacketPayload",
"type": "object",
"properties": {
"Player Game Type": {
"title": "GameType",
"type": "string",
"enum": [
"Undefined",
"Survival",
"Creative",
"Adventure",
"Default",
"Spectator",
"WorldDefault"
],
"x-underlying-type": "int32",
"x-serialization-options": [
"Compression",
"EnumAsValue"
],
"x-ordinal-index": 0
}
},
"required": [
"Player Game Type"
]
}
},
"title": "SetPlayerGameTypePacket",
"description": "Set Player Game Type",
"type": "object",
"properties": {
"mPayload": {
"$ref": "#/definitions/2923560331",
"x-ordinal-index": 0
}
},
"$metaProperties": {
"[cereal:packet]": 62,
"[cereal:packet_details]": "The client handles the change of the UI element (the gametype dropdown, although this can be avoided by changing via command or on the server), then the client sends a packet to the server, then the server changes the player's gametype and sends a packet back (UpdatePlayerGameTypePacket) to make sure it matches on the client."
}
}