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!
@dotapurex1
I would do that right away, but I'm in the middle of a huge update. I've botched up the code so much right now I can't push a 1.6.2 version. It might be a few more days
Update to 1.6.2?
Thanks for this plugin, superckl. :D
@Marium0505 I'll take that into consideration for the next update (which is already fairly large).
I have a few suggestions when it comes to the names for the different things you can disable, to make sure everyone can understand what they are for and means.
Disable Crafting -> Craft (only in permissions), shorter. :P
Disable Placing: <->I would suggest to split that up in two, Block Place (name, place) & Block Break (name, break)
Disable Dropping: -> drop (only in permissions), easier to type. :P
Disable Item In Inventory: Disable -> Remove, disable may be confusing.
Disable Brewing: Change to Brew (only in permissions), easier to type.
Delete Item If Found Needs to be more clear... Disable item if found, I suppose "disable" means remove? And then, remove from where?
I would also suggest to features to disable drinking (drink), Enchanting (enchant), Cooking (cook), Have an item/block in the inventory (have), Wear (wear), Open (open), Hold (hold), Brew (brew), Use (use).
I would also like to be able to be notified when a player who doesn't have permission to do one of the disabled actions. And be able to change per action whether I want to have the notifications enabled.
Does the config accept #comments ?
Also... uhm... could you just add really short descriptions about the different disable * things?
The functions I mainly wants to know what is for is:
Disable Interact:
Disable Item In Inventory:
Disable Dispensing:
Disable Spawning:
Disable Brewing:
Delete Item If Found:
@Error998
Haha, glad that it works. I wasted a lot of brain juice on that!
@superckl
OMFG, I found the problem >_<
So sorry to have bothered you so much about this, please feel free to shoot me >_<
Yes it does detect the Multiverse Worlds at startup, my noob error was that the config is case sensitive regarding world names :/
home: != Home:
\:D/
@Error998
Could you try something for me? Have someone go to the Multiverse worlds then do /disabler reload. Then try the items that should be disabled.
Also, on start up, does it print a line "Hooked into Multiverse" or something similar?
@superckl
MV B667 details
I believe jdroque added that functionality to the dev build 667 of Multiverse.
@Error998
I know that too. I am wondering how you configured Multiverse to change it's world structure.
@superckl
Oh lol :) I'm using MCPC+ 1.5.2-R0.2-forge716-B519 and Multiverse-Core-2.5-b667
More Info regarding MCPC
@Error998
Yes, I got that much. I'm wondering how you did that.
@superckl
3 Worlds: world, Home and Mining
The old structure was: \world, \Home, \Mining
New structure is: \world, \world\Home, \world\Mining
Hope this helps a bit
@Error998
How is your Multiverse setup? I'm not entirely sure how you even changed the world file structure.
Unfortunately with Multiverse it still does not work for me
@chrislarsson: Thanks so much for the update, it seems to be working as expected now. :)
@poundfoot
Your issue was actually my fault. The brewing disabling was completely not working. I just uploaded V3.2 that fixes that. (Bukkit needs to approve it first)
@Error998
V3.2 (just uploaded) has Multiverse-Core support! Just wait for Bukkit to approve the file. I don't have the time to extensively test it, so please, be careful!
@superckl
Yes, hmmm strange I was under the impression that it did hook into multiverse since it did world 100% with Multiverse worlds before the world structure change.
But it would be great if you could add MV support.
Thanks ;-)
@Error998
Did it break when you switched the world structure? I imagine that would break it since this plugin does not hook into Multiverse. In the next update, I will add a Multiverse option (if that is the issue).