Join us on Discord!
From Minecraft Wiki
Sets the difficulty level (peaceful, easy, etc.).
- Java Edition
- Bedrock Edition
difficulty <difficulty: Difficulty>
difficulty <difficulty: int>
- difficulty (BE: difficulty: Difficulty or difficulty: int)
- Specifies the new difficulty level. Must be one of the following:
- 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.
- To change the difficulty to hard:
difficulty h,[until 1.13] or
difficulty 3[until 1.13]
- See also
/gamemode– changes a player's game mode (creative, survival, etc.)