Minecraft Wiki

The Minecraft Wiki is no longer considered as official by Microsoft and therefore several changes are required to be made, including to the wiki's logo. Please read this announcement for more information.

READ MORE

Minecraft Wiki
Advertisement
Minecraft Wiki
Information icon.svg
This feature is exclusive to Java Edition. 
defaultgamemode
Permission level
required

2

Restrictions

None

Sets the default game mode (creative, survival, etc.) for new players entering a multiplayer server.

Syntax[]

defaultgamemode <mode>

Arguments[]

<mode>

Specifies the default game mode for new players. Must be one of the following:

Result[]

CommandTriggerJava Edition
anyOn successSets the default game mode.
New players who join the world are put into the default game mode.
In multiplayer, if force-gamemode in the server.properties file is true, sets all online players to the specified game mode.

Output[]

CommandEditionSituationSuccess Count/execute store success .../execute store result ...
anyJava EditionIf in multiplayer, and force-gamemode in the server.properties file is true11the number of online players whose game mode is changed
Otherwise110

Examples[]

  • To set the default game mode to survival: defaultgamemode survival

See also[]

/gamemode – changes a player's game mode

History[]

Java Edition
1.3.112w22aAdded /defaultgamemode.
1.814w05aAdded spectator to /defaultgamemode.
Advertisement