Skip to main content

/gamemode

Sets a player's game mode to survival, creative, adventure, or spectator.

Category
Player
Permission Level
Game Master
Version Added
1.0

Overview

Sets a player's game mode to survival, creative, adventure, or spectator. In vanilla Minecraft Java Edition it is one of the player commands and has been available since version 1.0.

It is invoked as /gamemode [] and accepts one required argument () and one optional argument ([target]).

Switching to creative while falling negates fall damage. Switching from creative to survival while flying will cause the player to fall.

Switching into Creative cancels any current fall, so it can be used to negate fall damage; dropping back to Survival while airborne resumes the fall.

Syntax & Arguments

/gamemode <gamemode> [<target>]

The full syntax is /gamemode []. 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 . The argument [target] may be omitted, in which case the documented default applies.

gamemode
Required, of type a gamemode. The game mode to set: survival, creative, adventure, or spectator.
target
Optional, of type an entity. The player(s) to change. Defaults to self.

Parameters

NameTypeRequiredDescription
gamemodegamemodeRequiredThe game mode to set: survival, creative, adventure, or spectator.
targetentityOptionalThe player(s) to change. Defaults to self.

Examples

The 3 examples below are ready to copy and adapt. For instance, /gamemode creative sets your own game mode to creative. Each example varies the arguments to show a different real use of /gamemode; read the note under every snippet to see exactly what changes.

/gamemode creative

Sets your own game mode to creative.

/gamemode survival @a

Sets all players to survival mode.

/gamemode spectator @p

Puts the nearest player into spectator mode.

Permission Level & Requirements

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

Java vs Bedrock — Bedrock accepts the same mode names and also the legacy numeric ids (0 survival, 1 creative, 2 adventure, 6 spectator); Java rejects numeric ids since 1.13.

Common Mistakes

Notes

Switching to creative while falling negates fall damage. Switching from creative to survival while flying will cause the player to fall.

Related Commands

If /gamemode is part of your toolkit, the commands below are the ones you will most often reach for alongside it: /defaultgamemode and /spectate. They cover closely related tasks, so the links above jump straight to each one.

Frequently Asked Questions about /gamemode

What does the /gamemode command do in Minecraft?

Sets a player's game mode to survival, creative, adventure, or spectator. It belongs to the player command group and was added in Java Edition 1.0.

What is the correct syntax for /gamemode?

/gamemode []. The required argument is gamemode, and the optional one is target.

What permission level does /gamemode 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 /gamemode?

Using numeric mode IDs (0, 1, 2, 3), Java Edition 1.13+ requires the full name (survival, creative, adventure, spectator).

Can you give an example of /gamemode in use?

Yes. /gamemode survival @a — sets all players to survival mode.

Need a Minecraft server?

Try these commands on Astroworld or host your own server.

Try Astroworld Hosting