Check for null rsp when loading Vault perms.
Also replace tabs with spaces.
This commit is contained in:
parent
e10239f686
commit
74fb2c8b7d
@ -118,10 +118,12 @@ public class P extends MPlugin {
|
|||||||
|
|
||||||
private boolean setupPermissions() {
|
private boolean setupPermissions() {
|
||||||
try {
|
try {
|
||||||
RegisteredServiceProvider<Permission> rsp = getServer().getServicesManager().getRegistration(Permission.class);
|
RegisteredServiceProvider<Permission> rsp = getServer().getServicesManager().getRegistration(Permission.class);
|
||||||
perms = rsp.getProvider();
|
if (rsp != null) {
|
||||||
|
perms = rsp.getProvider();
|
||||||
|
}
|
||||||
} catch (NoClassDefFoundError ex) {
|
} catch (NoClassDefFoundError ex) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return perms != null;
|
return perms != null;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user