/defaultgamemode
Sets the default game mode for new players joining the server. Does not change existing players' game modes.
Overview
Sets the default game mode for new players joining the server. Does not change existing players' game modes. In vanilla Minecraft Java Edition it is one of the gameplay commands and has been available since version 1.3.
It is invoked as /defaultgamemode and accepts one required argument (
This changes the default-gamemode setting. Existing players retain their current game mode. To change all current players, use /gamemode.
It only sets the mode applied to players the first time they join; it never changes the mode of anyone already on the server — use /gamemode for that.
Syntax & Arguments
/defaultgamemode <mode>The full syntax is /defaultgamemode . Angle brackets < > mark required arguments and square brackets [ ] mark optional ones; a vertical bar | between words means you pick exactly one of those literals. You must always supply
- mode
- Required, of type a gamemode. The default game mode: survival, creative, adventure, or spectator.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| mode | gamemode | Required | The default game mode: survival, creative, adventure, or spectator. |
Examples
The 2 examples below are ready to copy and adapt. For instance, /defaultgamemode adventure sets the default game mode to adventure for all new players. Each example varies the arguments to show a different real use of /defaultgamemode; read the note under every snippet to see exactly what changes.
/defaultgamemode adventureSets the default game mode to adventure for all new players.
/defaultgamemode survivalSets the default game mode back to survival.
Permission Level & Requirements
/defaultgamemode sits at permission Level 2 - Game Master / Cheats, which means it needs permission level 2, the level cheats grant to single-player worlds and that operators hold by default.
In a single-player world you must have "Allow Cheats" turned on (or open the world to LAN with cheats) before it will run; on a multiplayer server the player needs to be an operator at the matching level.
This reference describes the Java Edition 1.21 form of the command; Bedrock Edition may use slightly different argument formats.
Common Mistakes
- Expecting /defaultgamemode to change existing players' modes, it only affects newly joining players.
- Confusing /defaultgamemode with /gamemode, use /gamemode to change a specific player's mode.
Notes
This changes the default-gamemode setting. Existing players retain their current game mode. To change all current players, use /gamemode.
Related Commands
If /defaultgamemode is part of your toolkit, the commands below are the ones you will most often reach for alongside it: /gamemode and /difficulty. They cover closely related tasks, so the links above jump straight to each one.
Frequently Asked Questions about /defaultgamemode
What does the /defaultgamemode command do in Minecraft?
Sets the default game mode for new players joining the server. Does not change existing players' game modes. It belongs to the gameplay command group and was added in Java Edition 1.3.
What is the correct syntax for /defaultgamemode?
/defaultgamemode
What permission level does /defaultgamemode need?
It requires permission Level 2 - Game Master / Cheats. On a server the player must be an operator at that level, or have cheats enabled in single-player.
What is a common mistake when using /defaultgamemode?
Expecting /defaultgamemode to change existing players' modes, it only affects newly joining players.
Can you give an example of /defaultgamemode in use?
Yes. /defaultgamemode survival — sets the default game mode back to survival.
Need a Minecraft server?
Try these commands on Astroworld or host your own server.
Try Astroworld Hosting