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.

/difficulty at a glance

Syntax

/difficulty [<difficulty>]

Who may run it

OP (L2)

What it does

Sets or queries the game difficulty. Affects mob spawning, damage, hunger mechanics, and other gameplay…

Three things /difficulty is actually used for

/difficulty peaceful
Removes hostile mobs and stops hunger from draining, and despawns what is already there.
/difficulty hard
Turns on the full damage values, and on hard a zombie can break a wooden door.
/difficulty
With no argument it simply reports which difficulty the world is on.

/difficulty sits with the gameplay rules in Minecraft, 2 of them in total. The ones with a guide here: /gamerule.

Every command with its full argument list lives in the command reference.

More guides on this site

Guides that go with this one

How to Use the /gamemode Command in Minecraft
<> One command swaps a player between Survival, Creative, Adventure and Spectator. Learn the full...
How to Host a Project Ozone 3 Server
Guide to host a Project Ozone 3 server, Forge setup, Java 8 requirement, RAM allocation, skyblock/normal...
How to Safely Reload Plugins Without Restarting
A practical guide to reload plugins on a minecraft server safely, covering PlugManX, per-plugin reload...
How to Set Up Backups for Your Minecraft Server
Complete guide to backing up your Minecraft server: world files, plugin configs, databases, scheduled...
How to Back Up Your Minecraft Server
Set up automatic Minecraft server backups: flush the world with save-all, zip it with tar, keep...
How to Migrate from Vanilla to Paper, Keep Your World
Step-by-step guide to migrate from a Vanilla Minecraft server to Paper. Covers world folder structure,...
Database
Command Reference
Syntax, arguments and examples for every command.
Hosting
Managed Hosting
Skip the setup: a managed server online in minutes.
Database
Item Database
Every item with its stats, IDs, recipes and uses.
Guides
More Server & Admin guides
Run a server: setup, hosting, permissions, worlds and crossplay.