GriefBeGone - Item/Block Disabler 2
Version 4.0 (Bukkit 1.7.2) is in beta testing!
Item/Block Disabler2 is a plugin designed to allow server administration to easily deny access to items and blocks. It allows you to choose what worlds you want items disabled in, and how you want the block disabled! It is extremely lightweight and is designed to have no exploits.
Configuration
On first run, a config.yml will be generated that looks like this:
Disable Crafting: message: '&4The force is not with you.' main: - '657:2' Disable Placing: message: '&4The force is not with you.' main: - '657:2' Disable Interact: message: '&4The force is not with you.' main: - '657:2' Disable Dropping: message: '&4The force is not with you.' main: - '657:2' Disable Pick-Up: message: '&4The force is not with you.' main: - '657:2' Disable Item In Inventory: message: '&4The force is not with you.' main: - '657:2' Disable Dispensing: main: - '657:2' Disable Spawning: main: - '657:2' Disable Brewing: main: - '657:2' Delete Item If Found: main: - '657:2'
The entries are self explanatory, but here's an example of how to disable items. Say I wanted to disable stone in the world "home", but not completely disable them. I only want to disable dropping and placing. I also don't want it to delete the disabled item should the plugin find one, and I want it to tell the player "You can not do that!" in dark red.
I also want wooden planks not being dispensed in the world "main". I also want it to clear the wooden planks out of the dispenser should it find some. My config would look like this:
Disable Crafting: message: '&4The force is not with you.' Disable Placing: message: '&4You can not do that!' home: - '1' Disable Interact: message: '&4The force is not with you.' Disable Dropping: message: '&4You can not do that!' home: - '1' Disable Pick-Up: message: '&4The force is not with you.' Disable Item In Inventory: message: '&4The force is not with you.' Disable Dispensing: main: - '5' Disable Spawning: Delete Item If Found: main: - '5'
The messages and item ids must be surrounded by apostrophes, not quotation marks! Make sure your messages don't have apostrophes, it will screw up the plugin!
Permissions
Item/Block Disabler2 Also supports permissions! This allows for administrators to apply disabling rules to only certain groups of people! Here are the permissions:
- disabler.reload - allows access to /disabler reload
- disabler.bypass.crafting.worldname.itemid - allows user to bypass crafting restrictions
- disabler.bypass.placing.worldname.itemid - allows user to bypass placing restrictions
- disabler.bypass.interact.worldname.itemid - allows user to bypass interacting restrictions
- disabler.bypass.dropping.worldname.itemid - allows user to bypass dropping restrictions
- disabler.bypass.pickup.worldname.itemid - allows user to bypass picking up restrictions
- disabler.bypass.inventory.worldname.itemid - allows user to bypass inventory restrictions
- disabler.bypass.delete.worldname.itemid - allows user to bypass item deletion
- disabler.bypass.all.worldname.itemid - allows users to bypass everything - New in V2.6
Note: With V3.1, you can use '*' as the item id to represent all item ids in the config and for permissions.
Say I wanted a player to not get their wooden planks deleted, but only a certain color of wooden planks in the world "main". I would give them:
disabler.bypass.delete.main.5:2
Miscellaneous
As mentioned before, I designed this to be extremely lightweight and exploit free. If you find a bug or an exploit, submit a ticket or shoot me a pm. I will fix it as fast as I can. Enjoy!
I realize this plugin may be used on Tekkit servers, but sadly, it was not designed for Tekkit servers. It is not my fault if there are bypasses on Tekkit servers. Update 23/4/13: Bukkit no longer accepts plugins compiled with 1.2.5. Versions compiled with 1.4.7 should still work on 1.2.5, but no guarantees!
@marubal21
As long as the item has an item id and the events are fired, this plugin will work. It should work on 1.5.1 and 1.5.2. I will recompile with those versions when a recommended build is released.
does this only work with default Minecraft items or also items added because of installed mods? also does it work on 1.5.1 and 1.5.2?
@GummyGum173
Have you tried disabling interact? Right clicking will fire the interact event which should be cancelled.
@superckl
Aight, I wanted to make an armor with permissions only. When people click it in order to move it to their armor slot, it disappears, but still, people can hold it in their hand and right click, they will just equip it normally, any way to disable it?
@GummyGum173
You're misconstruing "Disable Item In Inventory". That check fires whenever they click an item in their inventory. There really is no reliable way (that I know of) to track items being added to an inventory other than pick-up.
Awesome plugin! Yet I have a one small problem, I've set an item in inventory and delete when found. Yet when I do /give xyz xyz, the item stays, is it a bug? or I'm not getting what "Disable Item In Inventory:" and "Delete Item If Found:" does?
@Error998
No, that won't work, sorry! '*' only works for the entire item id. I might add that later though. Couldn't you just do '657' instead of '657:*'? It will have virtually the same effect.
Hi chrislarsson
I'm so glad I found your epic plugin!
I want to disable placing but my problem is that the itemID is like this for example:
657:1 - 657:100
Would the following config work?
Disable Placing:
message: '&4The force is not with you.'
main:
- '657:*'
@Daxius81
Yes, Bukkit needs to review the plugin before it's publicly available. Turns out V3.0 had a small bug with it not recognizing '*' on some actions, but I just uploaded a V3.1 that fixes it. Sadly, that needs to be approved also. You can PM if you want and I'll give you a DropBox link.
@superckl
Fantastic news and great responce, i really can't wait to try it out. Im guessing it has to go through a 24 hour evalution period at Bukkit before it is public released? I sure wouldnt mind a more private link to try it out ;)
Ive also figured out why this disabler.bypass.all.akgc.46 didnt Work... i forgot the 'r' in disabler, so it was a typo, sorry for the alarm :)
If there is anything else i can help you with, please dont hesitate to ask.
Best regards Daxius
@Daxius81
1) I just uploaded V3.0 with that option. Thanks for the suggestion!
2) V3.0 allows you to use * for the item id. It's strange that disabler.bypass.all.akgc.46 doesn't work for you, it works for me. Would you mind sending your permissions file to me? You can send it in a PM if you aren't comfortable sending it here.
Hey chrislarsson.
Great plugin you got here. I allready got everything working on my server as intended.
I got issues though...
Edit: Forgot to say im using Item/Block Disabler2 V2.6[1.4.7 R1.0].
1) Is the a way to disable ALL items in the config.yml like:
?
2) And it appears the disabler.bypass.all.akgc.46 dosent Work. disabler.bypass.pickup.akgc.46 is working just fine. And would it be possible to do a disabler.bypass.all.akgc.*
So far ive written hundreds of lines where i need to disable every single item. The disabler.bypass.all.akgc.* would be used for an admin Group within my zpermissions plugin.
Thank you so much for creating this plugin.
Best regards Dax
hey thanks. I allready made a copy of what the permissions will be.
@LanceFortier
Bukkit needs to approve the file before it is available. Your config shouldn't change.
@superckl
I don't see the file on the files list the latest one is 2.5 and will i be able to use my same config.
@LanceFortier
Thanks for the suggestion. I just uploaded V2.6 which contains the permission node "disabler.bypass.all.worldname.itemid". Enjoy!
i love this plugin, but i have a probelm i have over 25 sperate banned items in each world, i want to give my $50 donors the no banned items what so ever. my problem is i would have to add over 250 permission nodes to get all the items. i work a full time job and i don't have 3-4 hours to add them all. i really wish their was a way to just allow them to bypass it allotheather. what i want to know is of their is a way to do this. i use groupe manager. and im running ftb mindcrack 1.4.7
@Marky717
Thanks! For the chat spamming, you can just disable the message for pick-up. It spams because the event is called about once a tick, and I really didn't want to store the player to track the messages.
Just a very quick comment for you. Having used a few different plugins of this nature to try and keep my server happy, I was very glad to have met yours. Others were kicking up errors, or were not as light as this one, and it seems that, aside from some chat spamming when you try to pick up a forbidden item, this is perfect. So just a quick thank you for the time you put into this, it's making my job much easier :)
@michidk
Could you elaborate a bit more?