Updated:
Spawn Monsters game rule (spawn_monsters)
The "Spawn Monsters" rule is called spawn_monsters in Java 1.21.11 and later, and spawnMonsters in 1.21.10 and earlier. Controls whether monsters (hostile mobs) spawn naturally.
Basic data
| Name | Spawn Monsters |
|---|---|
| Rule name (Java 1.21.11+) | spawn_monsters |
| Old name (Java 1.21.10 and earlier) | spawnMonsters |
| Bedrock name | No rule with the same name |
| Value type | true / false |
| Default | true |
Commands you can copy
Turn off (false)
/gamerule spawn_monsters falseReset to the default (true)
/gamerule spawn_monsters trueCheck the current value
/gamerule spawn_monstersJava 1.21.10 and earlier
/gamerule spawnMonsters falseNotes
- This rule moved from server.properties to a game rule in Java 1.21.9. Write
spawnMonstersin 1.21.9–1.21.10 andspawn_monstersin 1.21.11 and later. - Java 1.21.11 renamed game rules to lower case with underscores. If an older command or a map description uses the old name, rewrite it for your version.
- Game rules are saved per world. On a server, a new world starts with the default values again.
Questions
Typing spawnMonsters gives an error
In Java 1.21.11 and later the rule is called spawn_monsters. Write /gamerule spawn_monsters … instead. Worlds on 1.21.10 and earlier keep the old name.
How do I check the current value?
Run /gamerule spawn_monsters without a value. The current value is shown in chat.