This library provides two methods:
Code (Text):
ProtectionLib.canBuild(player, location)
ProtectionLib.canBreak(player, location)
To use this lib:
1) Add the jitpack repo
Code (Text):
maven { url 'https://jitpack.io' }
2) Shade ProtectionLib to your plugin
Code (Text):
implementation 'com.github.oraxen:protectionlib:master-SNAPSHOT'
3) Init ProtectionLib in your plugin onEnable()
Code (Text):
ProtectionLib.init();
4) Add softdepend to plugin.yml
Code (Text):
softdepend: [ WorldGuard, Towny, Factions, Clans ]
You can now use ProtectionLib#canBuild(player, location) and ProtectionLib#canBreak(player, location) in your plugin.