Commands/difficulty

Sets the difficulty level (peaceful, easy, etc.).


 * Syntax


 * Java Edition


 * Bedrock Edition


 * Arguments


 * difficulty (BE: difficulty: Difficulty or difficulty: int) (optional)


 * Specifies the new difficulty level. Must be one of the following:
 * (can be abbreviated as  or  ) for peaceful difficulty
 * (can be abbreviated as  or  ) for easy difficulty
 * (can be abbreviated as  or  ) for normal difficulty
 * (can be abbreviated as  or  ) for hard difficulty


 * 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:,  , or


 * See also


 * – changes a player's game mode (creative, survival, etc.)