don't hook PEX if it's less than 1.16

This commit is contained in:
Sleaker 2011-11-09 17:04:53 -08:00
parent 72f2830e46
commit a4a6d51c36
2 changed files with 8 additions and 0 deletions

Binary file not shown.

View File

@ -55,6 +55,14 @@ public class Permission_PermissionsEx extends Permission {
if (permission == null) {
Plugin perms = plugin.getServer().getPluginManager().getPlugin("PermissionsEx");
if (perms != null) {
try {
if (Double.valueOf(perms.getDescription().getVersion()) < 1.16) {
log.info(String.format("[%s][Permission] %s below 1.16 is not compatible with Vault! Falling back to SuperPerms only mode. PLEASE UPDATE!", plugin.getDescription().getName(), name));
return;
}
} catch (NumberFormatException e) {
// Do nothing
}
if (perms.isEnabled()) {
permission = (PermissionsEx) perms;
log.info(String.format("[%s][Permission] %s hooked.", plugin.getDescription().getName(), name));