Disable Mob Spawning
Stop mobs from spawning naturally in the world
⚠︎ Awaiting in-game verification for Java 26.2Prevents all natural mob spawning. Mobs summoned with commands still appear. Set back to true to restore normal spawning.
/gamerule doMobSpawning false29 characters
- Java: yes
- Bedrock: yes
- Command block: yes
- Needs cheats / OP: yes
How to use
- Open chat (T on Java, / on Bedrock).
- Paste the command.
- Press Enter — no new mobs will spawn.
Related commands
Stop creepers, endermen, and other mobs from changing blocks
/gamerule mobGriefing falseStop mined blocks from dropping items
/gamerule doTileDrops falseKeep your items when you die instead of dropping them
/gamerule keepInventory true