@minecraft/server / GameMode
Enumeration: GameMode ​
Defined in: @minecraft/server/index.d.ts:1630
Represents a game mode for the current world experience.
Enumeration Members ​
Adventure ​
Adventure:
"Adventure"
Defined in: @minecraft/server/index.d.ts:1637
Remarks ​
World is in a more locked-down experience, where blocks may not be manipulated.
Creative ​
Creative:
"Creative"
Defined in: @minecraft/server/index.d.ts:1649
Remarks ​
World is in a full creative mode. In creative mode, the player has all the resources available in the item selection tabs and the survival selection tab. They can also destroy blocks instantly including those which would normally be indestructible. Command and structure blocks can also be used in creative mode. Items also do not lose durability or disappear.
Spectator ​
Spectator:
"Spectator"
Defined in: @minecraft/server/index.d.ts:1661
Remarks ​
World is in spectator mode. In spectator mode, spectators are always flying and cannot become grounded. Spectators can pass through solid blocks and entities without any collisions, and cannot use items or interact with blocks or mobs. Spectators cannot be seen by mobs or other players, except for other spectators; spectators appear as a transparent floating head.
Survival ​
Survival:
"Survival"
Defined in: @minecraft/server/index.d.ts:1671
Remarks ​
World is in a survival mode, where players can take damage and entities may not be peaceful. Survival mode is where the player must collect resources, build structures while surviving in their generated world. Activities can, over time, chip away at player health and hunger bar.