Skip to main content

/difficulty

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

Category
Gameplay
Permission Level
Game Master
Version Added
1.0

Overview

Sets or queries the game difficulty. Affects mob spawning, damage, hunger mechanics, and other gameplay aspects. In vanilla Minecraft Java Edition it is one of the gameplay commands and has been available since version 1.0.

It is invoked as /difficulty [] and accepts one optional argument ([difficulty]).

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.

Peaceful instantly despawns hostile mobs and freezes hunger drain; only on Hard can zombies break wooden doors and do husks/strays apply their stronger effects.

Syntax & Arguments

/difficulty [<difficulty>]

The full syntax is /difficulty []. Angle brackets < > mark required arguments and square brackets [ ] mark optional ones; a vertical bar | between words means you pick exactly one of those literals. Every argument is optional, so the bare command is valid on its own. The argument [difficulty] may be omitted, in which case the documented default applies.

difficulty
Optional, of type a difficulty. The difficulty to set: peaceful, easy, normal, or hard. If omitted, displays the current difficulty.

Parameters

NameTypeRequiredDescription
difficultydifficultyOptionalThe difficulty to set: peaceful, easy, normal, or hard. If omitted, displays the current difficulty.

Examples

The 3 examples below are ready to copy and adapt. For instance, /difficulty hard sets the world difficulty to hard. Each example varies the arguments to show a different real use of /difficulty; read the note under every snippet to see exactly what changes.

/difficulty hard

Sets the world difficulty to hard.

/difficulty peaceful

Sets the difficulty to peaceful, removing all hostile mobs.

/difficulty

Displays the current difficulty setting.

Permission Level & Requirements

/difficulty sits at permission Level 2 - Game Master / Cheats, which means it needs permission level 2, the level cheats grant to single-player worlds and that operators hold by default.

In a single-player world you must have "Allow Cheats" turned on (or open the world to LAN with cheats) before it will run; on a multiplayer server the player needs to be an operator at the matching level.

Java vs Bedrock — Bedrock accepts the same names plus the legacy numeric ids 0-3; Java requires the names since 1.13.

Common Mistakes

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

If /difficulty is part of your toolkit, the commands below are the ones you will most often reach for alongside it: /gamerule and /defaultgamemode. They cover closely related tasks, so the links above jump straight to each one.

Frequently Asked Questions about /difficulty

What does the /difficulty command do in Minecraft?

Sets or queries the game difficulty. Affects mob spawning, damage, hunger mechanics, and other gameplay aspects. It belongs to the gameplay command group and was added in Java Edition 1.0.

What is the correct syntax for /difficulty?

/difficulty []. The required arguments are none, and the optional one is difficulty.

What permission level does /difficulty need?

It requires permission Level 2 - Game Master / Cheats. On a server the player must be an operator at that level, or have cheats enabled in single-player.

What is a common mistake when using /difficulty?

Using numeric difficulty values (0-3), Java Edition 1.13+ requires the full name (peaceful, easy, normal, hard).

Can you give an example of /difficulty in use?

Yes. /difficulty peaceful — sets the difficulty to peaceful, removing all hostile mobs.

Need a Minecraft server?

Try these commands on Astroworld or host your own server.

Try Astroworld Hosting