Ad · Sztuka HarmoniiAdCouples therapy in English · −50% off your first visit · Sztuka HarmoniiCouples therapy in English · −50% · Sztuka HarmoniiBook
Discord
Ad · Sztuka Harmonii5.0 · 190+ reviewsA centre recommended by patientsRecommended by patients6 offices in Gdańsk, Gdynia and Sopot, plus online sessions.−50%off your first visitBook an appointmentBook

/gamemode command

The /gamemode command changes a player's game mode. There are four modes: Survival, Creative, Adventure and Spectator. It's one of the first commands every player learns.

Player and movement OP 2 since Beta 1.3

Syntax

Java and Bedrock Edition

/gamemode <mode> [player]

Parameters in <angle brackets> are required. Parameters in [square brackets] are optional.

Parameters

Parameter Type Required Description
mode survival|creative|adventure|spectator Yes The game mode to set. Java takes the full names (older versions also accepted the numbers 0-3). Bedrock takes the full names, abbreviations (s/c/a) or numbers (0-2, no spectator).
player selector/player No The player whose game mode changes. Defaults to whoever runs the command.

Usage examples

Example 1
/gamemode creative

Switches you to Creative mode: flying, unlimited resources and no damage.

Example 2
/gamemode survival Steve

Switches the player Steve to Survival mode.

Example 3 Java
/gamemode spectator @a

Switches all players to Spectator mode. Handy before an event on a server.

Example 4
/gamemode adventure @a[tag=participant]

Puts every player with the "participant" tag in Adventure mode. They can't break or place blocks.

Tips and tricks

*

Spectator mode is only available in Java Edition. In Bedrock you have Survival, Creative and Adventure.

*

Switching to Creative gives you the full Creative inventory without removing the items you already have. When you switch back to Survival, you keep the items you took in Creative.

*

In Adventure mode, players can't break blocks unless they're holding an item with the CanDestroy tag. Perfect for adventure maps.

*

On servers you can switch modes quickly with a shortcut: /gm 1 (if the server supports Essentials/CMI shortcuts).

Related commands

Frequently asked questions

How do you use the /gamemode command in Minecraft?

Open the chat with the T or / key and type the command using this syntax: /gamemode <mode> [player]. The /gamemode command changes a player's game mode. There are four modes: Survival, Creative, Adventure and Spectator. It's one of the first commands every player learns.

What permissions does /gamemode require?

The /gamemode command requires permission level 2: Operator (OP 2). In singleplayer with cheats turned on, you automatically have full permissions. On a multiplayer server, you need operator status, which is granted with the /op command.

Does /gamemode work in Bedrock Edition?

Yes, the /gamemode command works in both Java Edition and Bedrock Edition, with similar syntax.