From bd5c78bb4084ca4a70433c4eecafd69198d9b271 Mon Sep 17 00:00:00 2001 From: zml2008 Date: Sun, 23 Oct 2011 09:19:29 -0700 Subject: [PATCH] Fixed bug in PermissionsEx resolver when PermissionsEx is not found. --- .../bukkit/migration/PermissionsExResolver.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/sk89q/bukkit/migration/PermissionsExResolver.java b/src/main/java/com/sk89q/bukkit/migration/PermissionsExResolver.java index 84b86fe01..b42a523ef 100644 --- a/src/main/java/com/sk89q/bukkit/migration/PermissionsExResolver.java +++ b/src/main/java/com/sk89q/bukkit/migration/PermissionsExResolver.java @@ -31,13 +31,17 @@ public class PermissionsExResolver implements PermissionsResolver { private final Server server; public static PermissionsResolver factory(Server server, YAMLProcessor config) { - PermissionManager manager = server.getServicesManager().load(PermissionManager.class); + try { + PermissionManager manager = server.getServicesManager().load(PermissionManager.class); - if (manager == null) { + if (manager == null) { + return null; + } + + return new PermissionsExResolver(server, manager); + } catch (Throwable t) { return null; } - - return new PermissionsExResolver(server, manager); } public PermissionsExResolver(Server server, PermissionManager manager) {