How to turn off hostile mobs in Minecraft
Run /gamerule spawn_monsters false and hostile mobs stop spawning naturally, while animals still spawn.
spawn_monsters
Controls whether hostile mobs spawn naturally.
/gamerule spawn_monsters <true|false> Examples
/gamerule spawn_monsters false No natural hostile mob spawns.
Values
| Value | What it does |
|---|---|
| trueDefault | On |
| false | Off |
Arguments
true|falseOptionaltrueturns the rule on,falseturns it off. Leave it out to show the current value.
What it does
Set it to false to stop monsters spawning in the dark while animals and other passive mobs keep spawning. It is a softer option than switching to peaceful difficulty, since hunger and other survival mechanics stay.
Good to know
- Replaces the old
spawn-monstersline in server.properties.
Run it on your server
On a SLASHPLAY server, type it in the Console tab without the leading slash; in game, operators type it in chat with the slash. New to this? Start a Minecraft server first.
Your own
Minecraft server.
From $0.03 an hour, only while it runs. New accounts get 6 free tokens.