WorldJavaBedrock
/difficulty
Changes the world difficulty between peaceful, easy, normal, and hard. Peaceful stops hostile mob spawns and regenerates health; harder levels increase mob damage, hunger effects, and (on hard) zombie door-breaking and reinforcement. Run with no argument to print the current difficulty.
Syntax
Parameters
- leveloptional
- literal
- peaceful, easy, normal, or hard. Omit to query.
Examples
Switch to Peaceful — hostile mobs despawn and health regenerates.
Set Hard difficulty for maximum challenge.
Print the world's current difficulty.
Common questions
How do I turn off mobs in Minecraft?
Run /difficulty peaceful. Hostile mobs stop spawning and existing ones despawn. Combine with /kill @e[type=#minecraft:undead] to clear any already loaded.
Permission level
/difficulty requires Cheats (op level 2). In single-player you need the world's "Allow Cheats" toggle on. On a multiplayer server you need to be opped — see /op.