| Type | Command |
|---|
Data checked Oct 21, 2026
The /gamemode command changes a player’s game mode in Minecraft: Survival, Creative, Adventure or Spectator. It is one of the most used commands in the game, whether you want to switch to Creative to build, Spectator to scout a world, or put players into Adventure mode on a custom map. This command reference covers the full syntax for Java and Bedrock, every game mode and what it does, examples, target selectors, permissions, keyboard shortcuts and common errors.
Syntax
| Edition | Syntax |
|---|---|
| Java | /gamemode <mode> [target] |
| Bedrock | /gamemode <mode> [player] |
- mode: the game mode to switch to: survival, creative, adventure or spectator.
- target or player (optional): who to change. If left out, the command changes your own game mode. You can use a player name or a target selector such as @a or @p.
Accepted mode values
| Mode | Java | Bedrock |
|---|---|---|
| Survival | survival | survival, s or 0 |
| Creative | creative | creative, c or 1 |
| Adventure | adventure | adventure, a or 2 |
| Spectator | spectator | spectator |
| Default | Not available | default or d (the world default) |
Java Edition removed the short forms and numbers years ago, so in Java you must type the full name. Bedrock still accepts letters and numbers, which is faster to type on consoles and phones.
Examples
| Command | What it does |
|---|---|
| /gamemode creative | Switches you to Creative |
| /gamemode survival | Switches you back to Survival |
| /gamemode spectator | Lets you fly through blocks and watch |
| /gamemode adventure @a | Puts every player in Adventure |
| /gamemode creative Steve | Gives the player Steve Creative |
| /gamemode survival @a[gamemode=creative] | Java: moves everyone in Creative back to Survival |
| /gamemode c | Bedrock shortcut for Creative |
The four game modes explained
Survival
The standard way to play. You gather resources, craft, manage health and hunger, and fight mobs. You can die and drop your items. Most achievements and advancements are designed around Survival.
Creative
You get unlimited blocks and items from the Creative inventory, can fly by double-jumping, cannot take damage from most sources and break blocks instantly. Mobs ignore you. Creative is for building, testing redstone and designing maps.
Adventure
Like Survival, but you cannot break or place blocks unless an item has special tags allowing it. Adventure mode is used on custom maps, parkour courses, puzzle maps and minigame servers, so players follow the map maker’s design instead of digging through walls. You can still use buttons, levers, doors and trade with villagers.
Spectator
You fly through blocks invisibly and cannot interact with the world. Left-click a mob or player to see through its eyes. Spectator mode is excellent for scouting caves, checking builds, recording videos and watching other players without interfering. Bedrock Edition added Spectator mode later than Java, so update your game if it does not appear.
Permissions and cheats
- Single player: cheats must be enabled. In Java, use Open to LAN with Allow Cheats on to enable them temporarily in an existing world. In Bedrock, turn on Activate Cheats in world settings.
- Servers and Realms: you must be an operator (permission level 2 or higher in Java).
- Achievements: in Bedrock, enabling cheats permanently disables achievements in that world. In Java, advancements still work but some players consider commands cheating for challenges.
Keyboard shortcuts (Java)
- F3 + F4: opens the game mode switcher. Keep holding F3 and press F4 to cycle, then release to switch.
- F3 + N: toggles between your previous mode and Spectator.
These shortcuts require cheat permission, just like the command.
Changing the default game mode
The /defaultgamemode command sets the mode new players start in when they join for the first time, for example /defaultgamemode adventure on a custom map server. It does not change players who already joined; use /gamemode for them. In Java, server owners can also set gamemode in server.properties, and force-gamemode to make every player rejoin in the default mode.
Hardcore mode
Hardcore is not a game mode you can switch to with /gamemode. It is a world setting in Java Edition: you play Survival on Hard difficulty with one life, and after death you can only spectate. A Hardcore world cannot be converted with commands in normal play, and cheats are locked off when creating one. Bedrock does not have an official Hardcore mode, though some players use add-ons or strict rules.
Common errors
- Unknown command or you do not have permission: cheats are off or you are not an operator.
- Incorrect argument: in Java you typed a short form like c or 1. Use the full word.
- No player was found: the target name is misspelled or the player is offline.
- Spectator not recognized in Bedrock: update to the latest version.
Related commands
- /give: give items, often used with Creative testing.
- /tp: teleport players.
- /difficulty: change difficulty.
- /gamerule: change world rules.
For a beginner overview, see essential Minecraft commands.
/gamemode FAQ
How do you change game mode in Minecraft?
Type /gamemode followed by survival, creative, adventure or spectator, with cheats enabled.
What is the command for Creative mode?
/gamemode creative, or /gamemode c in Bedrock.
Can you use /gamemode without cheats?
No. You need cheats or operator permission.
Does changing game mode disable achievements?
In Bedrock, enabling cheats disables achievements for that world.
Can you switch to Hardcore with a command?
No. Hardcore is chosen when creating a Java world.
When to use each game mode
Most players spend nearly all their time in Survival, and use the other modes as tools. Switch to Creative to plan a large build in a test world, copy its design, then rebuild it in Survival with real materials. Use Spectator to check what is under the ground before digging a big project, to find a lost pet or item, or to look inside a structure without triggering mobs. Adventure is mainly for map makers and server owners who want players to follow a path, solve puzzles and use only the items they are given. On family worlds, parents often keep young children in Creative so they can build freely without monsters, and switch older children to Survival when they want a challenge.
Game modes on servers
On servers, game modes are controlled by staff. Survival servers usually lock everyone in Survival, creative servers give each player a plot in Creative, and minigame servers move players between Adventure and Spectator automatically, for example putting eliminated players into Spectator so they can watch the rest of the round. Server owners set the starting mode in the server settings and use permission plugins to decide who can change modes. If you join a server and cannot change your game mode, it is because you do not have operator permission there, which is normal.
Game mode and items
Switching game modes does not delete your inventory. Items you take from the Creative menu stay with you when you switch back to Survival, which is why many survival challenges forbid Creative mode. In multiplayer, giving another player Creative lets them spawn any item, so only give it to people you trust. Spectator mode hides your inventory and hotbar while you fly, and everything comes back when you return to another mode.
One last tip: if you are testing something risky, switch to Creative before trying it and back to Survival after, so a mistake does not cost you your items. In Java you can also press F3 + N twice to hop into Spectator and straight back, which is a quick way to peek through walls when cheats are on.