From e10239f6864e9633db0cc63425bc3749ad36b848 Mon Sep 17 00:00:00 2001 From: mrlolethan Date: Sun, 1 Mar 2015 13:14:10 -0330 Subject: [PATCH] Fix NoClassDefFoundError being thrown on enable when Vault isn't loaded. --- src/main/java/com/massivecraft/factions/P.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/massivecraft/factions/P.java b/src/main/java/com/massivecraft/factions/P.java index 26281734..76c9d271 100644 --- a/src/main/java/com/massivecraft/factions/P.java +++ b/src/main/java/com/massivecraft/factions/P.java @@ -117,8 +117,12 @@ public class P extends MPlugin { } private boolean setupPermissions() { - RegisteredServiceProvider rsp = getServer().getServicesManager().getRegistration(Permission.class); - perms = rsp.getProvider(); + try { + RegisteredServiceProvider rsp = getServer().getServicesManager().getRegistration(Permission.class); + perms = rsp.getProvider(); + } catch (NoClassDefFoundError ex) { + return false; + } return perms != null; }