No Mob Griefing
No Mob Griefing
This is a lightweight plugin that let's the user disable or enable griefing for certain mobs without having to use '/gamerule doMobGriefing false'. The player can disable or enable griefing worldwide and after configuring once, the plugin will remember it and there is no need to change the settings again.
For those who do not know, this is not the same as disabling the gamerule mobGriefing, because that will also stop snowgolems from generating snow, villagers from harvesting food (needed for a villager breeder) and the picking up of items by other mobs. This plugin enables to user to choose which mobs can grief and which mobs can not grief. This plugin also supports extra functions that are not included in the doMobGriefing gamerule, for example tnt griefing.
Update: multiworld support added in v3.0.0!
This plugin now supports multiple worlds. For servers using default Minecraft worlds this means you can toggle griefing for the overworld, nether and the end. This should also work with multiverse as long as the worlds are uniquely named.
Steps you need to take when updating from v2.6.0 or lower to v3.0.0 or higher:
- Write down what settings you currently have for the overworld.
- Delete the config file in the folder NoMobGriefing and reload the server.
- Configure the correct settings again.
Commands
These commands can only be executed by a player and are executed for the world the player is currently in.
/nmg - Basic command that shows info about the plugin and shows all commands that a player has permission for.
/nmg list - A command that shows a list of all mobs and wether their griefing has been enabled or disabled.
/nmg blaze[enable|disable] - Enables/disables blazes igniting blocks.
/nmg creeper [enable|disable] - Enables/disables creepers destroying blocks.
/nmg door [enable|disable] - Enables/disables zombies breaking doors.
/nmg enderdragon [enable|disable] - Enables/disables the enderdragon destroying blocks.
/nmg enderman [enable|disable] - Enables/disables endermen picking up blocks.
/nmg ghast [enable|disable] - Enables/disables ghasts destroying blocks.
/nmg item_pickup [enable|disable] - Enables/disables mobs being able to pick up items, excluding villagers and armor stands.
/nmg piglin [enable|disable] - Enables/disables piglin bartering, might be resource intensive.
/nmg sheep[enable|disable] - Enables/disables sheep eating grass.
/nmg silverfish[enable|disable] - Enables/disables silverfish entering or leaving blocks.
/nmg snowgolem [enable|disable] - Enables/disables snowgolems leaving snow trails.
/nmg rabbit[enable|disable] - Enables/disables rabits eating crops.
/nmg ravager[enable|disable] - Enables/disables ravagers destroying blocks.
/nmg tnt [enable|disable] - Enables/disables tnt destroying blocks.
/nmg tntminecart [enable|disable] - Enables/disables tnt minecarts destroying blocks.
/nmg turtle_egg [enable|disable] - Enables/disables zombies breaking turtle eggs.
/nmg trampling[enable|disable] - Enables/disables mobs trampling farmland (not the player).
/nmg wither [enable|disable] - Enables/disables withers destroying blocks.
Permissions
There are only permissions for the commands, see the table below.
Permission node | Default |
---|---|
nmg.list | true (everyone) |
nmg.<command>* | op |
* Example: nmg.enderman
Changelog
v3.0.3
- Fixed bug where players could not pick up items when item_pickup was disabled
- Fixed bug where missing config options would disable an option
- Missing config options are automatically added for each available world when enabling the plugin: (re)starting/reloading the server
v3.0.2
- Updated to 1.18
- Added a command to enable/disable piglin bartering (might be resource intensive)
- Added a command to enable/disable mobs being able to pick up items (excluding villagers and armor stands)
v3.0.1
- Hotfix to prevent error spam in the console
v3.0.0
- Added multiworld support, check the description above on how to update
v2.6.0
- Updated to 1.17 (should work for every 1.17 version)
- Added blaze command
- Minor text changes
v2.5.2
- Added metrics
- Minor text changes
v2.5.1
- Hotfix
- Changed the versions to match industry standards
v2.5.0
- Updated to 1.16
- Added a command for silverfish
- Fixed explosions being able to destroy item/block entities (armor stands, paintings, etc.)
- Fixed a few missing permissions
- Commands and config are now in alphabetical order
v2.4.0
- Updated to 1.15
- Added a command to enable/disable tnt minecarts destroying blocks.
v2.3.0
- Fixed bug where ghasts could destroy blocks (this time for real).
- Fixed bug where withers were able to destroy blocks they came in contact with.
- Added a command to enable/disable zombies breaking turtle eggs.
- Renamed the 'zombie' command to 'door'. If you are experiencing any weird things, try deleting the config folder of the NoMobGriefing plugin.
v2.2.0
- Fixed a bug where the ghast griefing option was not working
- Added a command to enable/disable ravagers destroying blocks
- Added a command to enable/disable sheep eating grass
- Added a command to enable/disable rabbits eating crops
- Added a command to enable/disable mobs trampling farmland
v2.1.0
- Updated to 1.14
v2.0.0
- Updated to 1.13
- Minor text fixes
- Minor performance updates.
v1.3.0
- Fixed permission nodes
- Added a command to enable/disable zombies breaking doors
- Added a command to enable/disable tnt destroying blocks
v1.2.0
- Added a command to enable/disable snowgolems leaving snow behind
v1.1.1
- Hotfix
v1.1.0
- Added smart tab completion for commands
- Organised permission nodes
v1.0.0
- Initial release
Suggestions/planned features
Feel free to comment what features you would like to see added in this plugin. Please contact me when something does not work properly, it helps when you attach an error message (if available).
Currently planned:
- Nothing, feel free to suggest something in the comments down below!
Other plugins
Custom Manhunt - A plugin that enables you to play the manhunt minigame.
Quality of Life - A plugin that adds a ton of life enhancing features.
Easy Deaths - A plugin that makes dying a little less harsh.
Does this work for a MC: 1.19 server hosted on paper 1.19.4-R0.1 bukkit version?
Can you add ability to disable crystals grief too. thanks.
This plugin is so good, for example sometimes i use "/gamerule mobGriefing false" to disable creeper destroying blocks, but that command also make villagers unable to take bread thus they can't breed, or enderman unable to take dirt blocks.
but with this amazing plugin i can just do:
/nmg creeper disable
/nmg tnt disable
/nmg wither disable
which is really very amazing.
Thanks for the plugin. I'm using it on 1.19.3 paper.
Please add support for a reload command and 1.19.3
Hi, great plugin!
Can you add support for End Crystal? :)
Does this work with spigot?
In reply to Vektroid__:
yes
Please add zombie pigman being able to break turtle eggs!!!! I cant make a wither skeleton or gold farm otherwise!!
The not being able to pick up items bug is fixed (v3.0.3), thanks for reporting and even better: providing a fix. If the file is not yet available, please be patient as it needs to be reviewed first.
For those curious, these were actually two bugs in one. First one being the item_pickup rule being bugged to also exclude the player from picking up items. The second one is that whenever a config was missing, the plugin saw it as disabled. So when item_pickup was missing in the config, it disabled it automatically. This is now fixed in the newest version, together with a better way to load default config every time the server is started, automatically adding missing config in all possible worlds.
Cheers!
If after trying Corxldyphik's way of fixing the bug where you cant pick up items, it didn't seem to work, you can do what I did.
Go to plugins --> NoMobGriefing --> config.yml in your server files.
Once you have the config open, add the following line to each of the world entries ;
item_pickup: true
After adding this line to the config file for the nether, the end, and the overworld you should be able to pick up items again. It worked for me, so I hope it works for everyone else too.
IF YOU CAN'T PICK UP ITEMS (at all or just not in either the overworld, the nether or the end):
Have an op/admin run /nmg list in-game in the world where you can't pick up things. The plugin seems to cancel some game events if its not yet configured.
If your an admin and don't have in-game nether/end access (or the above doesn't work because I actually haven't tested it lol, I did the thing below instead) do the following:
Check the config File at plugins/NoMobGriefing/config.yml. The entries for your overworld/nether/end may be missing. There should be a section for each, with overworld, nether and end being named [yourWorldsName], [yourWorldsName]_nether and [yourWorldsName]_end. Just copy/paste one of the existing sections, e.g. world and rename it, then configure each mob entry to true or false.
To the author: I think it may be a good idea to check for existence of the config values / create them if they don't exist not just when the list command is run, but everytime a player enters a world. I'm not familiar with Minecraft Modding, but I'm sure there is something like a WorldEnterEvent event you can listen to.
this plugin looks perfect for what i need it to do and it mostly is, except for the fact that i cant pick up items :/ (1.18)
for some reason once nomobgriefing is installed on a 1.18.1 server i cannot pick up any items, any fix?
In reply to winndeer:
Same after installing it on purpur 1.18.1 server we can't pickup items even if you are OP or not.
Hope it get fix soon
Just tested on 1.18, once installed I'm unable to pickup anything at all. lol
compatible with 1.18 yet?
In reply to johnnydapiggy:
It should be, I programmed the plugin in such a way that is should always work for the newest version, even without updating it.
In reply to Domoco:
I can't pick up items off the ground anymore even items dropped by myself. I'm using paper 1.18.1
Question
Is there anyway I can change so that villagers can still pick up items?
In reply to shockskm:
My plugin should not alter any behaviour regarding villagers picking up items