/defaultgamemode Command in Minecraft Java Edition

Set the Default Game Mode for the World

Java EditionPlayers & EntitiesPermission: Level 2

The /defaultgamemode command changes the default game mode of a Minecraft Java Edition world. It accepts survival, creative, adventure, or spectator as valid modes.

Server operators and single-player map makers use this command when setting up a world for specific activities like building, exploring custom maps, or standard survival play. To use this command, you need Level 2 operator permissions or have cheats turned on in single-player.

Syntax (Java 26.3, 1 form)

  1. /defaultgamemode <gamemode>

The forms you will use most

/defaultgamemode <gamemode>
Sets the world's default game mode to the specified mode.

Arguments

ArgumentTypeWhat it means
<gamemode>game modeSpecifies the game mode to set as the default, which must be survival, creative, adventure, or spectator.

Examples

Version history

Measured from the game files of every Java release from 1.13 to 26.3.

  1. 1.19.3 Syntax changed.
    + /defaultgamemode <gamemode>− /defaultgamemode adventure− /defaultgamemode creative− /defaultgamemode spectator− /defaultgamemode survival
  2. 1.13 Already in the game in 1.13, the oldest Java version we track.

Tips

Common mistakes

Java vs Bedrock

This command is exclusive to Minecraft Java Edition. Bedrock Edition does not have a command named /defaultgamemode.

FAQ

What permission level do I need to use /defaultgamemode?

You need Level 2 permissions, which means you must be a server operator or have cheats enabled in a single-player world.

What game modes can I use with /defaultgamemode?

You can only use the four standard game modes: survival, creative, adventure, or spectator.

Is the /defaultgamemode command in Minecraft Bedrock Edition?

No, Bedrock Edition does not have a command with this name.

Related commands

/advancement/attribute/damage/effect/experience/gamemode/kill/ride/rotate/spawnpoint/spectate/spreadplayers/summon/swing/teleport/tp