Difficulty Command Generator — /difficulty Peaceful, Easy, Normal, Hard (Java Edition)
Most of these need operator permission — run them from an op's chat, a command block, or the server console.
How to Use the Difficulty Command Generator
- Choose a difficulty: peaceful, easy, normal, or hard.
- Copy the generated
/difficultycommand into a command block, the console, or an operator’s chat.
Command Syntax Reference
/difficulty <peaceful|easy|normal|hard> /difficulty
/difficulty is a world-wide setting with no per-player targeting and no numeric argument overload – unlike gamemode, it only takes the named difficulty word (though difficulty does still have internal numeric IDs 0-3 used in save files). Running /difficulty with no argument reports the current setting instead of changing anything. Difficulty affects far more than damage numbers: it changes whether hostile mobs spawn at all (peaceful disables them and heals the player over time), hunger’s ability to kill, zombie door-breaking odds, and several other mob-behavior thresholds.
Frequently Asked Questions
Does peaceful difficulty remove hostile mobs that already exist?
Yes – switching to peaceful immediately despawns existing hostile mobs (with a few exceptions like some mobs summoned by commands) and prevents new ones from spawning naturally, on top of disabling starvation damage and restoring health/hunger passively over time.
What’s the actual gameplay difference between easy, normal, and hard?
Beyond raw mob damage scaling up from easy to hard, the difficulty level changes things like: whether hunger can reduce you below half a heart (easy) or fully kill you (hard), zombie chances of breaking down wooden doors (impossible on easy, increasingly likely on hard), and whether certain status effects like Hunger apply harsher penalties.
Is /difficulty the same as the difficulty setting in the world creation menu?
Yes – it’s the exact same underlying setting, just changeable at any time after world creation via command instead of being locked in at creation. Unless the world was set to “hardcore” (which enforces hard difficulty and disables changing it), /difficulty can freely switch between all four levels mid-game.
Can I lock difficulty so players can’t see or change it later?
Not with /difficulty itself – locking difficulty (so it’s grayed out in the pause menu and can’t be changed even by an operator through the UI) requires the separate “Lock Difficulty” option in the world’s settings, though a command-block /difficulty can still override it depending on server configuration.
Related Tools
- Gamerule Command Generator – fine-tune specific mob and world behaviors beyond the difficulty preset.
- Gamemode Command Generator – pair a difficulty change with a gamemode switch for testing.
- Weather Command Generator – set up atmospheric conditions to match a harder difficulty test.