Commands/infobox
Sets the difficulty level (peaceful, easy, etc.).
- Syntax
- Java Edition
difficulty [<difficulty>]
- Bedrock Edition
difficulty <difficulty: Difficulty>difficulty <difficulty: int>
- Arguments
- difficulty (BE: difficulty: Difficulty or difficulty: int) (optional[Java Edition only])
- Specifies the new difficulty level. Must be one of the following:
peaceful(can be abbreviated aspor0[Bedrock Edition only]) for peaceful difficultyeasy(can be abbreviated aseor1[Bedrock Edition only]) for easy difficultynormal(can be abbreviated asnor2[Bedrock Edition only]) for normal difficultyhard(can be abbreviated ashor3[Bedrock Edition only]) for hard difficulty
- Specifies the new difficulty level. Must be one of the following:
- Result
- Fails if the arguments are not specified correctly.
- If successful, changes the game's difficulty. On a multiplayer server lasts only until the server is restarted — on restart, difficulty is reloaded from server.properties.
- Examples
- To change the difficulty to hard:
difficulty hard,difficulty h,[Bedrock Edition only] ordifficulty 3[Bedrock Edition only]
- See also
/gamemode– changes a player's game mode (creative, survival, etc.)