The fastest way to change game mode
Open the chat window by pressing T on your keyboard, then type /gamemode creative (or survival, adventure, or spectator) and press Enter. The game mode changes instantly. You can also use the shorter form: /gamemode c for creative, /gamemode s for survival, /gamemode a for adventure, or /gamemode sp for spectator.
This method works in single-player worlds where cheats are turned on. If you are playing on a server or in a world where cheats are off, you will need to turn cheats on first — or ask a server administrator to change your mode for you.
The command works the same way every time: open chat, type the command, press Enter. There is no menu to navigate or settings page to find.
Key Takeaways
- Press T to open chat, type /gamemode creative (or survival, adventure, spectator), and press Enter to switch modes instantly.
- Cheats must be turned on in your world settings for the command to work in single-player mode.
- You can use short codes like /gamemode c for creative or /gamemode s for survival instead of typing the full name.
- On multiplayer servers, only administrators can change your game mode unless they have given you permission to use commands.
Turning cheats on in a single-player world
If the chat command does not work, cheats are probably off. To turn them on, pause the game and click Open to LAN. A small window appears with a toggle for Allow Cheats — click it to turn cheats on, then click Start LAN World.
After you do this once, cheats stay on for that world. You only need to do it the first time you want to use commands. Close the LAN window and return to the game — you can now use the /gamemode command.
If you are creating a new world, you can turn cheats on before you enter the world. On the world creation screen, look for Allow Cheats and toggle it on before you click Create New World.
What each game mode does
Survival is the default mode. You have a hunger bar, health bar, and inventory limit. Mobs attack you, blocks take time to break, and you can die. You gather resources and craft items to progress.
Creative mode gives you unlimited blocks and items in your inventory, instant block breaking, the ability to fly, and no hunger or damage. Mobs do not attack. Use this mode to build without limits or test ideas quickly.
Adventure mode is like survival but with restrictions: you cannot break or place most blocks with your hand. You can only change the world using tools and items, which makes it useful for custom maps where the creator wants to control what you can and cannot do.
Spectator mode lets you fly around and watch without interacting. You cannot break blocks, place blocks, or take damage. You can pass through walls and other players. This mode is useful for watching other players or exploring without changing anything.
Changing someone else's game mode on a server
If you are running a server or have operator permissions, you can change another player's game mode using the command /gamemode creative PlayerName (replace PlayerName with the actual player's name). The player's mode changes immediately, and they see a message confirming the change.
You can also change your own mode this way, or use the command on yourself: /gamemode survival @s (the @s means "yourself"). This is useful in scripts or if you want to be precise about who the command affects.
If a player's name has spaces or special characters, put their name in quotes: /gamemode creative "Player Name".
Why the command does not work
The most common reason is that cheats are off. Pause the game, check whether Open to LAN shows Allow Cheats: ON, and turn it on if it does not. If you are on a server, ask an administrator whether command permissions are turned on for players.
Another reason is a typo in the command. Make sure you typed /gamemode (not /game or /mode), spelled the mode name correctly, and pressed Enter. The chat window closes when you press Enter, which means the command was sent — if nothing happens, cheats are off.
If you see a red error message in chat, read it carefully. Common messages are "Unknown command" (cheats are off), "That player does not exist" (you misspelled the player name), or "You do not have permission" (you are not an operator on the server).
Switching back to survival mode
Use the same command: open chat with T, type /gamemode survival, and press Enter. You return to survival mode with your inventory and position unchanged. If you were in creative mode and had collected items, those items stay in your inventory when you switch back.
Your health bar and hunger bar reappear when you switch to survival. If you were flying in creative mode, you stop flying and fall to the ground (or water, if you are above it). Mobs start attacking you again.
Frequently Asked Questions
Can I change game mode without opening chat?
No, the chat command is the only way to change game mode in Java Edition. There is no menu option or button. You must press T to open chat, type the command, and press Enter every time you want to switch.
Do I lose my stuff when I change game modes?
No. Your inventory, position, and progress stay the same when you switch modes. If you were in creative mode and collected items, they stay with you in survival mode. The only difference is how the world behaves around you.
Can I change game mode on a Realms world?
Yes, if you own the Realm or have operator permissions. Use the same /gamemode command. If you do not have operator status, ask the Realm owner to change it for you or give you permission to use commands.
What happens to mobs when I switch to creative mode?
Mobs stop attacking you and ignore you completely. They still exist and move around, but they treat you as if you are not there. If you switch back to survival mode, they resume attacking if they are close enough.
Is there a way to bind game mode switching to a single key?
Not in vanilla Java Edition. You always have to open chat and type the command. Some players use third-party tools or mods to create shortcuts, but those are not part of the base game.