OGTOOLS

Minecraft /gamemode command

Switches between Survival, Creative, Adventure and Spectator modes.

🧍 Player commands Operator (level 2) Needs cheats enabled Java Edition 26.3

Syntax

/gamemode <gamemode>
/gamemode <gamemode> <target>

Parts in square brackets are optional, parts in angle brackets are required. You do not type the brackets: Put your own value in their place.

Arguments

ArgumentWhat it does
<gamemode> survival, creative, adventure or spectator.
<target> Whose mode changes. Leave it out to change your own.

Examples

/gamemode creative

Puts you in Creative mode: You can fly, your inventory is unlimited and you take no damage.

/gamemode survival @a

Switches everyone on the server back to Survival mode.

/gamemode spectator Faruk

Makes Faruk a spectator: He passes through blocks and nobody can see him.

Good to know

  • You type the full name instead of a shortcut; the 0/1/2/3 numbers from older versions are no longer accepted.
  • To set the mode for players joining for the first time, use defaultgamemode.

How do I run this command?

Press T in game to open chat (or press / directly), type the command and press Enter. While typing, Tab completes the options. This command counts as a cheat: It needs cheats enabled in a singleplayer world, and operator permission on a server (operator (level 2)).

Related commands

🧍 More Player commands

Another tool Minecraft crafting recipes Would rather make the item than give it with a command? See the recipe on the 3x3 grid.

Minecraft is a product of Mojang Studios. This tool is an independent helper made for players and is not affiliated with Mojang or Microsoft.