mirror of https://github.com/MilkBowl/Vault.git
Update Permission_PermissionsEx.java
This commit is contained in:
parent
3cb2922ef8
commit
c37d433d6f
|
@ -49,13 +49,14 @@ public class Permission_PermissionsEx extends Permission {
|
|||
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));
|
||||
log.info(String.format(
|
||||
"[Permission] %s below 1.16 is not compatible with Vault! Falling back to SuperPerms only mode. PLEASE UPDATE!", name));
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
// Do nothing
|
||||
}
|
||||
permission = (PermissionsEx) perms;
|
||||
log.info(String.format("[%s][Permission] %s hooked.", plugin.getDescription().getName(), name));
|
||||
log.info(String.format("[Permission] %s hooked.", name));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -84,14 +85,15 @@ public class Permission_PermissionsEx extends Permission {
|
|||
if (perms.getDescription().getName().equals("PermissionsEx")) {
|
||||
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));
|
||||
log.info(String.format(
|
||||
"[Permission] %s below 1.16 is not compatible with Vault! Falling back to SuperPerms only mode. PLEASE UPDATE!", name));
|
||||
return;
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
// Do nothing
|
||||
}
|
||||
permission.permission = (PermissionsEx) perms;
|
||||
log.info(String.format("[%s][Permission] %s hooked.", plugin.getDescription().getName(), permission.name));
|
||||
log.info(String.format("[Permission] %s hooked.", permission.name));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -101,7 +103,7 @@ public class Permission_PermissionsEx extends Permission {
|
|||
if (permission.permission != null) {
|
||||
if (event.getPlugin().getDescription().getName().equals("PermissionsEx")) {
|
||||
permission.permission = null;
|
||||
log.info(String.format("[%s][Permission] %s un-hooked.", plugin.getDescription().getName(), permission.name));
|
||||
log.info(String.format("[Permission] %s un-hooked.", permission.name));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue