ProtectionsLib
ProtectionsLib is a WIP plugin that will provide developers with a vault-like interface allowing them to depend on multiple protections plugins (WorldGuard, Towny, Factions, etc.). The library can be downloaded on the left. Version 1.0.0 currently contains protections for WorldGuard, Towny and Factions.
Development
Development builds of this project can be found at this continuous integration server.
Usage
ProtectionsLib's API exists in the main plugin class file.
Fetching ProtectionsLib:
ProtectionsLib protections = null;
Plugin plugin = Bukkit.getPlugin("ProtectionsLib");
if (plugin instanceof ProtectionsLib) {
protections = (ProtectionsLib) plugin;
}
Currently, there are three checks you can do. Block checking, location checking and pvp checking.
protections.canBuild(player, block);
protections.canBuild(player, location);
protections.canPvp(player, target);