mirror of
https://github.com/MilkBowl/Vault.git
synced 2024-11-23 19:16:31 +01:00
fix PEX hook.
This commit is contained in:
parent
98808d7538
commit
5722a31346
@ -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));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user