![]() |
VOOZH | about |
/difficulty| Permission level required |
|
|---|---|
| Restrictions | Cheat only[BE only] |
{
"title": "<code>/difficulty</code>",
"rows": [
{
"field": "\n* 2 <sup class=\" nowrap Inline-Template \" title=\"\">[<i><span title=\"This statement only applies to Java Edition\">(link to Java Edition article, displayed as JE) only</span></i>]</sup>\n* 1 <sup class=\" nowrap Inline-Template \" title=\"\">[<i><span title=\"This statement only applies to Bedrock Edition\">(link to Bedrock Edition article, displayed as BE) only</span></i>]</sup>",
"label": "(link to Permission level article, displayed as Permission level<br>required)"
},
{
"field": "(link to Cheat article, displayed as Cheat) only<sup class=\" nowrap Inline-Template \" title=\"\">[<i><span title=\"This statement only applies to Bedrock Edition\">(link to Bedrock Edition article, displayed as BE) only</span></i>]</sup>",
"label": "(link to Commands#Restrictions article, displayed as Restrictions)"
}
],
"invimages": [],
"images": []
}
Sets or queries the difficulty level (peaceful, easy, etc.).
On a multiplayer server difficulty lasts only until the server is restarted — on restart, difficulty is reloaded from server.properties.
In Hardcore mode, the difficulty doesn't change even when successful.[Java Edition only]
difficulty [peaceful|easy|normal|hard]difficulty <difficulty: Difficulty>difficulty <difficulty: int>JE: peaceful|easy|normal|hard
BE: difficulty: Difficulty: enum and difficulty: int: int
peaceful (can be abbreviated as p or 0[Bedrock Edition only]) for Peaceful difficultyeasy (can be abbreviated as e or 1[Bedrock Edition only]) for Easy difficultynormal (can be abbreviated as n or 2[Bedrock Edition only]) for Normal difficultyhard (can be abbreviated as h or 3[Bedrock Edition only]) for Hard difficulty| Command | Trigger | Java Edition | Bedrock Edition |
|---|---|---|---|
| Any | The command is incomplete, or any argument is not specified correctly. | Unparseable | Unparseable |
| The original difficulty is the same as the specified difficulty. | Failed | Successful | |
| Otherwise | Successful | ||
| Command | Edition | Situation | Success Count | /execute store success ... | /execute store result ... |
|---|---|---|---|---|---|
| Any | Java Edition | On fail | 0 | 0 | 0 |
/difficulty ... | On success | 1 | 1 | 0 | |
/difficulty | On success | 1 | 1 | the number id of current difficulty (peaceful = 0, easy = 1, normal = 2, hard = 3) | |
| Any | Bedrock Edition | On fail | 0 | N/A | N/A |
| On success | 1 | N/A | N/A |
difficulty hard, difficulty h[Bedrock Edition only], or difficulty 3[Bedrock Edition only]| Java Edition | |||||||
|---|---|---|---|---|---|---|---|
| 1.4.2 | 12w32a | Added /difficulty. | |||||
| 1.13 | 17w45a | /difficulty [<value>] now only accepts string IDs, not shorthand or numeric. | |||||
/difficulty 2 is now /difficulty normal. | |||||||
/difficulty p is now /difficulty peaceful. | |||||||
The player can now query for the current difficulty by using /difficulty without any arguments. | |||||||
| Pocket Edition | |||||||
|---|---|---|---|---|---|---|---|
| 1.0.5 | alpha 1.0.5.0 | Added /difficulty. | |||||
/gamemode – changes a player's game mode (Creative, Survival, etc.)/difficulty Command" – Microsoft Learn, October 11, 2023.