To change gamemode on a Minecraft server, type gamemode creative PlayerName in the server console (or /gamemode creative in chat if you are OP). To change the mode new players get, set gamemode= in server.properties, and add force-gamemode=true if you want every player put back in that mode each time they join. This guide covers both, plus the errors people hit most.
Everything here applies to Java Edition servers running Vanilla, Paper, Purpur, Fabric or Forge. The four modes are survival, creative, adventure and spectator. Hardcore is not a gamemode you can switch to; it is a world setting.
Change gamemode for one player
The /gamemode command changes the mode of a single player right away, with no restart. It needs permission level 2, so in chat only an operator can use it. If you are not OP yet, see how to OP yourself on a Minecraft server.
- Open the server console. On TheGameHosting, open your server in the panel and click Console. Commands there run with full rights and need no slash.
- Type
gamemode creative PlayerNameand press Enter. Use the exact Java username. - Check the reply in the console. It confirms the new mode for that player.
- To switch the player back, type
gamemode survival PlayerName. - To change your own mode in game, type
/gamemode creativein chat. With no name, the command applies to you.
gamemode creative Steve
gamemode survival Steve
gamemode spectator @a
gamemode adventure @a[distance=..20]
Since Java 1.13, the command only accepts the mode names. The old numbers (gamemode 1) and letters (gamemode c) work on Bedrock but give an error on Java. Selectors such as @a (all players) and @p (nearest player) also work, which is handy for events.
| Mode | Command | What players can do |
|---|---|---|
| Survival | gamemode survival | Mine, build, take damage and need food |
| Creative | gamemode creative | Fly, unlimited blocks, no damage |
| Adventure | gamemode adventure | Play maps; cannot break or place blocks freely |
| Spectator | gamemode spectator | Fly through blocks and watch; cannot interact |
An operator can also open the game mode switcher with F3 + F4 in game and cycle modes with F4.
Change the default gamemode on a Minecraft server
The default gamemode is the mode a player gets the first time they join. It lives in server.properties as gamemode, with survival as the value in a new file.
- Stop the server from the panel, or keep it running and restart at the end.
- Open Files and click
server.propertiesin the main folder. - Change the line to the mode you want, for example
gamemode=creative. - If you also want players who already joined to switch, set
force-gamemode=true. - Save the file and restart the server.
gamemode=creative
force-gamemode=true
You can also run defaultgamemode creative in the console. It changes the default without a restart, but check that server.properties says the same mode, so you know what the server will use after the next restart.
force-gamemode explained
This is the setting that confuses most server owners. The server saves each player's mode in their player data. When you change gamemode= in server.properties, only new players get it; players who already joined keep the mode they had.
force-gamemode | What happens when a player joins |
|---|---|
false (default) | They keep the mode they had when they left |
true | They are put in the default gamemode every time |
Use force-gamemode=true on a lobby, a minigame server or a survival server where you never want someone stuck in Creative after an event. Leave it on false on a build server where staff switch modes all the time, or they will be sent back to the default each time they reconnect.
Hardcore and adventure servers
Hardcore is not a value of gamemode. It is set with hardcore=true in server.properties, and the setting only takes effect on a newly created world. To start a hardcore server, back up and rename or remove the old world folder from Files, set hardcore=true, and start the server so it makes a new world. Take a backup from Backups first, because the old world is gone if you skip it.
For a map with rules (parkour, escape rooms), set gamemode=adventure and force-gamemode=true, so players cannot break blocks and always come back in Adventure.
Common problems when you change the gamemode
- "Unknown or incomplete command". You typed a number or a letter. Use the full name:
gamemode creative. - "You do not have permission". Only operators with level 2 or higher can use it in chat. Run it from the console or OP the player.
- The default mode did nothing. Players who already joined keep their saved mode. Set
force-gamemode=trueor switch them one by one with/gamemode. - The change was lost after a restart. You used the command but
server.propertiesstill has the old value. Edit the file and restart. - A plugin switches players back. Lobby and world plugins (multi-world, minigames) can set their own mode per world. Check their config files too.
- Testing deaths in Creative. Creative players never lose items, so a test in Creative tells you nothing about death drops. See keep inventory on a Minecraft server for that rule.
Run your server with the mode you want, on TheGameHosting
On your own PC, every change means editing files by hand and the world closes when the computer turns off. On TheGameHosting you do it in one panel: Console for gamemode and defaultgamemode, Files to edit server.properties, and Backups to save the world before you test a hardcore setup. The server runs on AMD 9950X or 7950X3D CPUs with NVMe storage in Dallas or Amsterdam, stays online 24/7 and includes DDoS protection on every plan.
A small Java server starts with the 2 GB plan at $1.90 USD per month, ready about 60 seconds after payment, with no charge per player. See the plans on Pricing or read more about our Minecraft server hosting. If you also want to fine-tune the world, our guide on changing the view distance is a good next step.
FAQ
How do I change the default gamemode on my Minecraft server?
Set gamemode=creative (or another mode) in server.properties and restart. New players get that mode; add force-gamemode=true if players who already joined should switch too.
Why does my gamemode change back when I rejoin?
The server has force-gamemode=true, so it puts every player in the default mode on join. Set it to false and restart if you want players to keep their mode.
Can I use /gamemode 1 on a Java server?
No. Java Edition only accepts the names survival, creative, adventure and spectator. Numbers and letters only work on Bedrock.
How do I make my Minecraft server hardcore?
Set hardcore=true in server.properties and generate a new world. The setting does not convert an existing world, so back it up first.
Hosting for this game
Written by TheGameHosting Team, the people who run our servers in Dallas and Amsterdam and answer your tickets.
All posts
TheGameHosting Team
