News
Game
Guides
Downloads
Versions
/defaultgamemode
COMMANDS PLAYERS & MOVEMENT CHEATS · LEVEL 2 Added in 1.14 or earlier

/defaultgamemode command in Minecraft

/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.

Syntax

/defaultgamemode <gamemode>
ArgumentExpectsWhat it does
gamemodeGame modeMode for first-time players, written in full: survival, creative, adventure or spectator.

Examples

Newcomers start in Adventure

/defaultgamemode adventure

First-time players join in Adventure Mode and cannot break blocks freely.

Java 26.3

Back to Survival by default

/defaultgamemode survival

New players will join in Survival Mode again.

Java 26.3

Spectators for an event

/defaultgamemode spectator

Visitors joining during an event arrive as spectators and cannot interfere.

Java 26.3
Build your command

Fill in the fields, then copy the command.

Command generator

Who is affected

Only 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.

LAN worlds in 26.3

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

/defaultgamemode: FAQ

Does /defaultgamemode change the mode of players already online?

Not by itself. It applies to first-time players, unless the server forces the default mode with force-gamemode.

How do I set the game mode for a LAN world in 26.3?

Use /defaultgamemode or the world options before opening the world, because /publish no longer takes a game mode.

How do I use /defaultgamemode?

Type it in the chat with cheats on: /defaultgamemode <gamemode>.

Who can use /defaultgamemode?

Cheats on, or operator level 2.

Related commands