Newcomers start in Adventure
/defaultgamemode adventureFirst-time players join in Adventure Mode and cannot break blocks freely.

/defaultgamemode sets the game mode given to players who join the world for the first time. Players the world already knows keep their own mode. It is mainly a server tool, for example to welcome newcomers in Adventure mode on a hub.
/defaultgamemode <gamemode>| Argument | Expects | What it does |
|---|---|---|
| gamemode | Game mode | Mode for first-time players, written in full: survival, creative, adventure or spectator. |
/defaultgamemode adventureFirst-time players join in Adventure Mode and cannot break blocks freely.
/defaultgamemode survivalNew players will join in Survival Mode again.
/defaultgamemode spectatorVisitors joining during an event arrive as spectators and cannot interfere.
Fill in the fields, then copy the command.
Command generatorOnly first-time players get the default mode. Everyone else keeps the mode saved with their data; change it with /gamemode. On a dedicated server, the force-gamemode option in server.properties applies the default mode to every player at each login. Hardcore cannot be set here.
Since 26.3, /publish no longer takes a game mode argument. To choose the mode of friends joining a LAN world, use /defaultgamemode or the world options before opening it. Pair it with /spawnpoint to decide where newcomers start.
✓ Checked in Java Edition 26.3 · updated 2 November 2026
Not by itself. It applies to first-time players, unless the server forces the default mode with force-gamemode.
Use /defaultgamemode or the world options before opening the world, because /publish no longer takes a game mode.
Type it in the chat with cheats on: /defaultgamemode <gamemode>.
Cheats on, or operator level 2.
/gamemodeCheats/swingCheats/posteffectCheats/teleportCheats/effectCheats/experienceCheats/spawnpointCheats/attributeCheats