From 927cab001e3366efddd52237761e8cda72920d29 Mon Sep 17 00:00:00 2001 From: zml2008 Date: Tue, 15 Nov 2011 20:36:29 -0800 Subject: [PATCH] Fixed a few bugs with permissions resolver loading. --- .../com/sk89q/bukkit/migration/NijiPermissionsResolver.java | 5 +++++ .../sk89q/bukkit/migration/PermissionsResolverManager.java | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/sk89q/bukkit/migration/NijiPermissionsResolver.java b/src/main/java/com/sk89q/bukkit/migration/NijiPermissionsResolver.java index ab6c80144..1d2837b65 100644 --- a/src/main/java/com/sk89q/bukkit/migration/NijiPermissionsResolver.java +++ b/src/main/java/com/sk89q/bukkit/migration/NijiPermissionsResolver.java @@ -34,6 +34,11 @@ public class NijiPermissionsResolver implements PermissionsResolver { public static PermissionsResolver factory(Server server, YAMLProcessor config) { PluginManager pluginManager = server.getPluginManager(); + try { + Class.forName("com.nijikokun.bukkit.Permissions.Permissions"); + } catch (ClassNotFoundException e) { + return null; + } Plugin plugin = pluginManager.getPlugin("Permissions"); diff --git a/src/main/java/com/sk89q/bukkit/migration/PermissionsResolverManager.java b/src/main/java/com/sk89q/bukkit/migration/PermissionsResolverManager.java index f2fa5bf9d..2e223f3e6 100644 --- a/src/main/java/com/sk89q/bukkit/migration/PermissionsResolverManager.java +++ b/src/main/java/com/sk89q/bukkit/migration/PermissionsResolverManager.java @@ -199,7 +199,7 @@ public class PermissionsResolverManager implements PermissionsResolver { for (Class clazz : availableResolvers) { if (!stagedEnabled.contains(clazz.getSimpleName()) && !disabledResolvers.contains(clazz.getSimpleName())) { - disabledResolvers.add(clazz.getName()); + disabledResolvers.add(clazz.getSimpleName()); logger.info("New permissions resolver: " + clazz.getSimpleName() + " detected. " + "Added to disabled resolvers list.");