Skip to main content
← All Guides
Server Commands

How to Change Difficulty With Commands

The /difficulty command flips your whole world between peaceful, easy, normal, and hard in one line. No config files, no restart, no plugin. It is the fastest way to dial danger up or down on the fly.

Below: the exact syntax, what each level changes, and how to make the setting stick after a restart.

server console, world: survival
peacefuleasynormalhard
[Server thread/INFO]: ready, accepting commands
>
Syntax and what each level changes

The command is simply /difficulty <level>. Run it with no argument to print the current difficulty instead of changing it.

  • peacefulno hostile mobs, hunger frozen, health regenerates on its own.
  • easymobs spawn but deal reduced damage; you can drop to half a heart from hunger.
  • normalthe default balance; hunger can drop you to half a heart.
  • hardzombies break doors, spiders get effects, and you can starve to death.

To make a server keep the value across restarts, set difficulty=hard in server.properties. The console change is live immediately; the properties file is what loads on boot.

Quick answers

+What are the four difficulty values?
peaceful, easy, normal, and hard. You can also use the numbers 0, 1, 2, and 3 in older versions. Peaceful removes hostile mobs entirely; hard lets zombies break doors and lets you starve to death.
+Do I need to restart the server?
No. /difficulty takes effect instantly on all loaded chunks and the change is saved to the world. A restart is only needed if you edit server.properties directly.
+Why does my difficulty reset after restart?
If difficulty in server.properties does not match, or force-gamemode style sync is off, the file value wins on load. Set difficulty=hard in server.properties to lock it.
+Can players change it themselves?
Only operators (permission level 2+) can run /difficulty. Regular players cannot. On Bukkit/Paper you can gate it further with a permissions plugin like LuckPerms.
+What does peaceful actually do?
It despawns all hostile mobs, stops new hostile spawns, and freezes the hunger bar so you regenerate health and never starve. Passive mobs and the Ender Dragon still exist.
+Is there a difficulty lock?
Yes, /difficulty (Bedrock) or the world's locked flag prevents changes mid-game. On Java the value is freely changeable by ops unless you remove their permission.
Hosting
Skip the setup
Get a managed server with one click instead of configuring it all yourself.
Database
Browse the mob database
See exactly which hostile mobs spawn at each difficulty and their drop tables.