Shield
Shield - A collection of common Bukkit protection plugin API
Author: Malikk
Version Beta 1.2
Shield is an API, bridging the gap between the many region protection plugins and the common plugin. Through Shield, plugin developers can easily access a variety of methods, without hooking a specific protection plugin, and have them applied universally. Hours of work adding support for a small handful of protection plugins is a thing of the past. A lot of work has been put into making Shield as easy to use as possible, so all of the api can be found in a single interface, clearly labeled and clearly documented automatically as soon as you've configured your build path.
Features
- Get region objects from Players, Locations, and names and prioritize them based on the config's plugin preference order.
- Run checks across several plugins and return whether or not all the plugins agree with permissions queries. (i.e. check canBuild across plugins)
- Set, edit, and check custom flags for you plugin
- Throw custom exceptions so you know exactly how to handle situations, such as an invalid region name or if a flag hasn't been set
Usage
Developers
To develop with Shield, all you have to do is download the jar and add it to your project's build path. For help hooking in Shield, check out the Shield Wiki.
Servers
Provided you are using a protection plugin supported by Shield and a plugin using its API, all you have to do is download Shield and drop it into your plugins folder. If you are using multiple protection plugins you can set their priorities in the config file.
Supported Protection Plugins
- Residence (http://dev.bukkit.org/server-mods/residence/)
- WorldGuard (http://dev.bukkit.org/server-mods/worldguard/)
- Regios (http://dev.bukkit.org/server-mods/regios/)
- AntiShare (http://dev.bukkit.org/server-mods/antishare/)
and soon many more!
Help
For help implementing and using Shield, check out the Github Wiki. Use the forums here for discussion and questions, and the tickets page for suggestions and bug reports.
I'll be leaving the comment section up here until I get some actual traffic.
@Malikk65 Hey this is only for container permissions but this assortment of checks may at least help you get a base for each of the plugins on it: https://github.com/t00thpick1/TShops/tree/master/src/t00thpick1/Protection/Plugins
@Malikk65
Ah I see, hopefully GP will be supported moving forward :)
@titen96
It's not going, lol, only because Bukkit has been keeping me so busy with updating other projects thanks to the 'safeguard' business and I had been super busy at school. But now I'm back in from out of town and I'm out of school for a few weeks, so you can finally expect to see from progress on this soon :)
Any news on how it's going? I'd like to know :P
@IDragonfire
Well, it's still very much a work in progress. I know what needs to be added and I don't really wanna deal with a flood of complaining people, lol.
plugin need more advertisment ...
http://dev.bukkit.org/server-mods/shieldapi/forum/40877-general-feedback/#p2
@Malikk65
Wow, this is great! Just a little while ago I was talking on irc with some other developers about how great it would be if there was a plugin that connected all of the protection plugins and provided an api. Didn't realize that there already was one! Keep up the great work on this I'll definitely be using it in the future.
@IDragonfire
Mostly just the plugin api that I'm working with. Nothing big, just small tweaks but it takes a lot of testing.
There's just a lot of bugs to work out. Like, my whole ShieldRegion object isn't working atm. The world saved to it always returns null, even tho its not null when I'm creating the object. Idk, just stupid stuff.
I am sure it's all easy changes, I just haven't had much time. My finals are coming up.
@Malikk65
What is broken?
@krisdestruction
1.4 broke a lot of things, and I had to wait on updates for the supported plugins to fix a lot of issues. I am the only dev working on this and it is a HUGE undertaking.
Wow hasn't been updated. Waiting on GP support and more plugin usage.
@fletch_to_99
Thanks
@Malikk65
I'm getting an NPE when checking if a player is in a wg region. I'll post the issue on your github.
@TOOTHPlCK1
I assumed residence handles all of that in it's own build checks, lol.
I'll get that added in.
@Sleaker
I've not dealt with licenses before, the whole idea of it's a bit over my head, lol.
I'll look into the difference, thanks
I suggest using LGPL instead of GPL as this seems to be intended as a library.
@Malikk65
Oh and btw just for full implementation you should put checks for ResAdmins(Or people with perms to override residence) in your CanBuilds and such. THis can be achieved with:
Returns true if they have override false if they don't
@TOOTHPlCK1
Oh, awesome.
I'll definitely take you up on that if I need it. Thanks
@Malikk65
Well I mainly offered because I am one of the Res dev's so if there is a problem with Residence whether now or in the future if you expand your stuff, I would be the guy to ask.
@fletch_to_99
Awesome :)
I can get the 'plugins using Shield' page up now.