/difficulty
Sets or queries the game difficulty. Affects mob spawning, damage, hunger mechanics, and other gameplay aspects.
Syntax
/difficulty [<difficulty>]Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| difficulty | difficulty | Optional | The difficulty to set: peaceful, easy, normal, or hard. If omitted, displays the current difficulty. |
Examples
/difficulty hardSets the world difficulty to hard.
/difficulty peacefulSets the difficulty to peaceful, removing all hostile mobs.
/difficultyDisplays the current difficulty setting.
Common Mistakes
- Using numeric difficulty values (0-3), Java Edition 1.13+ requires the full name (peaceful, easy, normal, hard).
- Not realizing that switching to peaceful instantly despawns all hostile mobs.
Notes
Difficulty affects mob spawning, damage, hunger drain, and whether mobs can break doors (hard only). On hard difficulty, zombies can break wooden doors and spiders can spawn with status effects.
Related Commands
Need a Minecraft server?
Try these commands on Astroworld or host your own server.
Try Astroworld Hosting