
Command
/difficulty
Shows the world's difficulty or changes it.
| /difficulty [(easy|hard|normal|peaceful)] |
| Permission level | 2: operators, worlds with cheats on, command blocks and functions |
| Works in | Singleplayer with cheats enabled and multiplayer servers. Needs permission level 2 (gamemasters): server operators, players with cheats, command blocks, and functions can all run it. |
| Result | Without an argument it reports "The difficulty is" followed by the current difficulty, and the number /execute store saves is 0 for Peaceful, 1 for Easy, 2 for Normal, and 3 for Hard. With an argument it reports "The difficulty has been set to" and the number /execute store saves is 0. |
| No argument | Shows the current difficulty without changing anything. |
| Same difficulty | Fails with "The difficulty did not change" if the world is already set to the chosen difficulty. |
| Locked difficulty | The command changes the difficulty even if it has been locked in the world's options. |
| Hardcore | A Hardcore world always stays on Hard, whatever difficulty is chosen. |
/difficultyShows the current difficulty.
/difficulty peacefulSets the difficulty to Peaceful.
/difficulty easySets the difficulty to Easy.
/difficulty hardSets the difficulty to Hard.
