How to Change Gamemode and Difficulty on a Minecraft Server
Whether you want a survival SMP, a creative build server, or you just need to bump the difficulty up to Hard, Minecraft gives you two ways to control gamemode and difficulty: the server.properties file (the defaults everyone gets) and in-game commands (live changes, including per-player). This guide covers both and explains when to use each.
server.properties: set gamemode=survival (or creative/adventure/spectator) and difficulty=hard (or peaceful/easy/normal), then restart. For live changes, use /gamemode creative PlayerName for one player and /difficulty hard for the whole world. Both need operator (OP) permission.The two ways to set it
server.propertiessets the defaults - what new players get when they join and what the world loads as on startup. Great for setting the overall style of your server.- In-game commands make live changes without a restart, and let you change gamemode for one player at a time. Great for flipping to creative to fix a build, then back.
You need to be an operator to run these commands. If you're not opped yet, do that first through your panel console or the ops list.
Change the default gamemode in server.properties
Open server.properties and find these lines:
gamemode=survival
force-gamemode=false
gamemodeacceptssurvival,creative,adventure, orspectator. This is the mode players spawn in.force-gamemodeis the one people miss. Whenfalse, a player keeps whatever mode they last had (so if you put someone in creative, they stay in creative on rejoin). When set totrue, everyone is snapped back to the defaultgamemodeevery time they join. Turn it on for a strict survival server so nobody keeps a creative session.
On FreaksMC, you don't need command-line access. Open the file manager in your panel, click server.properties, edit these values in the browser, save, and hit Restart.
Change the default difficulty in server.properties
In the same file:
difficulty=easy
hardcore=false
difficultyacceptspeaceful,easy,normal, orhard.- Peaceful - no hostile mobs spawn, and health regenerates fast. Hunger doesn't drain.
- Easy / Normal / Hard - mobs get progressively stronger and do more damage; on Hard, zombies break doors and starvation can kill you.
hardcore- whentrue, the server is locked to Hard difficulty and death is permanent (players are banned or set to spectator on death). Only enable this for a dedicated hardcore world - it overrides thedifficultyline.
Save and restart to apply.
Change gamemode live with commands
Run these in the in-game chat or in your panel's live console:
/gamemode creative
/gamemode survival Steve
/gamemode adventure @a
- The first changes your own mode.
- The second changes it for one named player (
Steve). - The third uses the target selector
@ato change all players at once.
Modes: survival, creative, adventure (can't break/place blocks without the right tools - good for maps), and spectator (fly through blocks, no interaction).
Per-player vs default: commands only affect players who are online right now and don't touch the server.properties default. So a temporary /gamemode creative won't stick after a restart unless force-gamemode is off and the player was in creative when they logged off.
Change difficulty live with commands
/difficulty hard
This changes the whole world's difficulty immediately, no restart. Options are peaceful, easy, normal, hard. There's no per-player difficulty - it's world-wide.
Note: you can't turn hardcore on or off with a command. hardcore is a server.properties setting that's read when the world is created, so it's effectively locked in for that world.
Which should you use?
- Setting the server's overall style (a survival SMP, a creative flat world) - use
server.propertiesso it's the default for everyone. - Temporary or per-player changes (letting a builder into creative, testing something) - use commands.
- Locking players into survival - set
force-gamemode=trueinserver.properties.
Common gotchas
- Command didn't stick after restart. Commands don't change the
server.propertiesdefault. Edit the file for permanent defaults. - Everyone reset to survival on join. That's
force-gamemode=truedoing its job. Set it tofalseif you want per-player modes to persist. - Difficulty won't change. If
hardcore=true, the world is locked to Hard. Turn hardcore off (and note it only takes effect on world creation). - Not opped. All of these commands need operator permission.
Running your own server means you get full control over server.properties and a live console for commands - no waiting on a host. FreaksMC gives you both on every plan. See plans from $3/mo - first-time purchases come with a 24-hour money-back guarantee.
Want a server that just runs fast?
FreaksMC runs on NVMe hardware with performance-tuned defaults baked in - pre-optimized Paper, sane view distances, and one-click world pre-generation. Set up in 60 seconds.
See plans from $3/mo