NewSchokr 13 is here. A whole new UI, seven locations, snapshots and more. Read more →

How to change difficulty and game mode on a Minecraft server

Change your Minecraft server's difficulty and default game mode with commands or server.properties, and force a game mode for everyone.

Updated · 2 min read

Change difficulty with /difficulty and game mode with /gamemode, or set the defaults permanently in server.properties with difficulty and gamemode. Commands take effect immediately; file changes need a restart.

Change difficulty

From the Schokr console (no slash needed there) or in-game as an op:

difficulty hard

The options are peaceful, easy, normal and hard. To make it permanent, set it in server.properties:

difficulty=normal

The server applies the value from server.properties on startup, so if you only use the command, the difficulty can go back to the file's value after a restart. Set both to be safe.

DifficultyEffect
peacefulNo hostile mobs, health regenerates, hunger does not drain
easyHostile mobs deal less damage, starving stops at 5 hearts
normalStandard damage, starving stops at half a heart
hardMore damage, starvation can kill, zombies can break doors

Change a player's game mode

gamemode creative Steve
gamemode survival @a

Game modes are survival, creative, adventure and spectator. In-game, /gamemode creative with no name changes your own mode. You need to be an op (level 2 or higher) to use it. See ops and op levels.

Change the default game mode

The default game mode is what new players get when they join for the first time. Change it with:

defaultgamemode creative

Or in server.properties:

gamemode=creative

Existing players keep their current game mode, because it is saved in their player data.

Force a game mode for everyone

To put every player into the default game mode each time they join, turn on force-gamemode:

gamemode=survival
force-gamemode=true

This is useful for a survival server where you want to be sure nobody stays in creative after testing something.

Difficulty is locked or does not change

  • In hardcore mode, difficulty is fixed to hard. See hardcore mode.
  • If someone used /difficulty and the server reverts after restart, update server.properties too.
  • On Paper, per-world difficulty can be different if a plugin such as Multiverse manages your worlds. Check that plugin's settings.

For PvP and peaceful setups, see PvP and peaceful settings.