mirror of
https://github.com/MilkBowl/Vault.git
synced 2024-11-24 03:25:11 +01:00
fix PEX hook.
This commit is contained in:
parent
98808d7538
commit
5722a31346
@ -55,6 +55,7 @@ public class Permission_PermissionsEx extends Permission {
|
|||||||
if (permission == null) {
|
if (permission == null) {
|
||||||
Plugin perms = plugin.getServer().getPluginManager().getPlugin("PermissionsEx");
|
Plugin perms = plugin.getServer().getPluginManager().getPlugin("PermissionsEx");
|
||||||
if (perms != null) {
|
if (perms != null) {
|
||||||
|
if (perms.isEnabled()) {
|
||||||
try {
|
try {
|
||||||
if (Double.valueOf(perms.getDescription().getVersion()) < 1.16) {
|
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("[%s][Permission] %s below 1.16 is not compatible with Vault! Falling back to SuperPerms only mode. PLEASE UPDATE!", plugin.getDescription().getName(), name));
|
||||||
@ -63,7 +64,6 @@ public class Permission_PermissionsEx extends Permission {
|
|||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
// Do nothing
|
// Do nothing
|
||||||
}
|
}
|
||||||
if (perms.isEnabled()) {
|
|
||||||
permission = (PermissionsEx) perms;
|
permission = (PermissionsEx) perms;
|
||||||
log.info(String.format("[%s][Permission] %s hooked.", plugin.getDescription().getName(), name));
|
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 != null) {
|
||||||
if (perms.isEnabled()) {
|
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;
|
permission.permission = (PermissionsEx) perms;
|
||||||
log.info(String.format("[%s][Permission] %s hooked.", plugin.getDescription().getName(), permission.name));
|
log.info(String.format("[%s][Permission] %s hooked.", plugin.getDescription().getName(), permission.name));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user