Change Player Game Modes in Minecraft
The /gamemode command changes the active game mode for you or other players on a server. You can switch between survival, creative, adventure, and spectator at any time.
Players and server operators use this command to test builds, explore worlds without taking damage, or set up custom map rules for visitors. You need permission level 2 (cheats enabled in single-player or operator status on a server) to run it.
/gamemode <gamemode> [<target>]/gamemode <gamemode> [<target>]| Argument | Type | What it means |
|---|---|---|
<gamemode> | game mode | The game mode to apply, which must be survival, creative, adventure, or spectator. |
<target> | target selector players only | An optional player name, UUID, or player-only target selector (such as @p, @a, or @s) identifying who gets the new game mode. |
/gamemode creativeChanges your own game mode to Creative when you do not specify a target.
/gamemode survival @sSwitches the player running the command back to Survival mode using the @s selector.
/gamemode adventure @aPuts every online player into Adventure mode at the same time.
/gamemode spectator @pSets the nearest player to Spectator mode.
/gamemode creative AlexChanges the game mode of a specific player named Alex to Creative.
Measured from the game files of every Java release from 1.13 to 26.3.
Bedrock Edition also includes the /gamemode command, but its syntax allows either a game mode name or an integer number: /gamemode <gameMode: GameMode> [player: target] or /gamemode <gameMode: int> [player: target].
In Minecraft Java Edition, the four valid options for the <gamemode> argument are survival, creative, adventure, and spectator.
The /gamemode command requires permission level 2, which means you must be a server operator or have cheats enabled in your single-player world.
No, the <target> argument only accepts players, so non-player entities cannot have a game mode.
/advancement/attribute/damage/defaultgamemode/effect/experience/kill/ride/rotate/spawnpoint/spectate/spreadplayers/summon/swing/teleport/tp