diff --git a/src/net/milkbowl/vault/permission/plugins/Permission_PermissionsEx.java b/src/net/milkbowl/vault/permission/plugins/Permission_PermissionsEx.java index 5122ab7..7829698 100644 --- a/src/net/milkbowl/vault/permission/plugins/Permission_PermissionsEx.java +++ b/src/net/milkbowl/vault/permission/plugins/Permission_PermissionsEx.java @@ -55,15 +55,15 @@ 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()) { + 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 + } permission = (PermissionsEx) perms; log.info(String.format("[%s][Permission] %s hooked.", plugin.getDescription().getName(), name)); } @@ -108,6 +108,14 @@ public class Permission_PermissionsEx extends Permission { if (perms != null) { if (perms.isEnabled()) { + 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 + } permission.permission = (PermissionsEx) perms; log.info(String.format("[%s][Permission] %s hooked.", plugin.getDescription().getName(), permission.name)); }