Gamemode Command Generator — /gamemode Survival, Creative, Adventure, Spectator
Most of these need operator permission — run them from an op's chat, a command block, or the server console.
How to Use the Gamemode Command Generator
- Choose a gamemode: survival, creative, adventure, or spectator.
- Leave the target empty to change your own gamemode, or enter a player name / selector such as
@ato change someone else’s (or everyone’s). - Copy the generated
/gamemodecommand into a command block, the console, or an operator’s chat.
Command Syntax Reference
/gamemode <mode> [target]
With no target, /gamemode changes the gamemode of whoever ran the command. With a target, it applies to that player or every player matched by a selector – /gamemode spectator @a switches the entire server to spectator mode in one command. All four gamemodes also have shorthand numeric IDs (0 = survival, 1 = creative, 2 = adventure, 3 = spectator) that still work, though the word form is clearer in command blocks and datapacks.
Frequently Asked Questions
What’s the difference between adventure and survival mode?
Adventure mode behaves like survival – same health, hunger, and combat – but players can’t break or place blocks by default (unless the block/tool sets specific CanDestroy/CanPlaceOn NBT tags). It’s built for map makers who want players to explore without altering the terrain.
Does switching to creative mode fill up my inventory?
No – /gamemode creative only changes your permissions (flight, instant break, no hunger/fall damage) and grants access to the creative inventory menu. Your existing hotbar and inventory items stay exactly as they were.
What happens to my inventory in spectator mode?
Nothing is dropped or cleared – your inventory is simply hidden and inaccessible while spectating, and returns exactly as it was when you switch back to survival, creative, or adventure.
Can I change the gamemode for every player who joins in the future?
That’s not what /gamemode does – it only changes the current gamemode of existing players. Use the separate /defaultgamemode command to set what new or respawning players receive by default.
Related Tools
- Default Gamemode Command Generator – set the world’s default gamemode for new and respawning players.
- Spectate Command Generator – watch a specific entity while already in spectator mode.
- Difficulty Command Generator – change world difficulty alongside gamemode for testing.