/
mc-node.net →
Minecraft

How do I disable or enable mob griefing on my Minecraft server?

Updated 04/09/20263 min read
In this article
  1. From the panel console
  2. What exactly changes?
  3. The pitfall: villagers and farms
  4. Disabling creepers only
  5. Is the setting saved?
  6. Related settings

Mob griefing is the collective name for everything mobs can change about the world: a creeper blowing a crater in your house, an enderman taking a block out of your wall, a zombie breaking down a wooden door, sheep eating grass, villagers harvesting crops. One gamerule turns all of that off: mobGriefing. On building servers and servers with young players it is often the first setting you change.

From the panel console

  1. Go to the game panel and click your server.
  2. Open the Console tab.
  3. Type gamerule mobGriefing false and press Enter.
  4. The console confirms: Gamerule mobGriefing is now set to: false.

Turn it back on with gamerule mobGriefing true. In-game you use the same command with a slash in front; for that you need to be OP.

What exactly changes?

  • Creepers still explode and still damage players, but no longer destroy blocks.
  • Endermen no longer pick up or place blocks.
  • Zombies no longer break doors and ghast fireballs no longer damage blocks.
  • Ravagers do not trample crops, sheep do not eat grass and snow golems leave no snow trail.
  • Wither explosions do not damage blocks; the Ender Dragon still destroys blocks (that falls under a different rule).

The pitfall: villagers and farms

Mob griefing also covers villagers. With the rule set to false, villagers can no longer harvest and plant crops, so every automatic farm that relies on them stops. Villager breeders that need food from a farmer also grind to a halt. On a survival server with experienced players that leads to complaints that seem to have nothing to do with griefing. The fix depends on your server software:

  • On Paper and Purpur you can exempt specific mobs in paper-world-defaults.yml (or per world) under entities.behavior, for example blocking creepers while letting villagers harvest.
  • With WorldGuard you set creeper-explosion deny and enderman-grief deny per region while the gamerule stays true, so villagers keep working.
  • On vanilla there is no middle ground: it is all or nothing.

Disabling creepers only

If you only want rid of creeper holes and keep everything else normal, a plugin is the better route. WorldGuard (with the global region) or a lightweight plugin that only blocks creeper explosions keeps the rest of the mob mechanics intact. On Purpur it can also be done per mob in purpur.yml.

Is the setting saved?

Yes. Gamerules live in the world file and survive restarts and version updates. They are per world, though: on a server with several worlds you set the rule in each world separately, or use a plugin that manages gamerules centrally. To check the current value, type gamerule mobGriefing without a value in the console.

Not behaving as expected, for example on a modpack server where a mod adds its own rules? Open a ticket and we will take a look.