From 4620b0eac02fe152caa90a9f4a594b5a9cbe9d58 Mon Sep 17 00:00:00 2001 From: Brettflan Date: Thu, 22 Sep 2011 02:19:57 -0500 Subject: [PATCH] Release 1.4.3: removed direct support for GroupManager, since a recent release of it broke integration and was resulting in a fatal error; as long as you're using its Permissions bridge, it should continue to work fine for you even with direct support removed --- nbproject/project.properties | 5 ++--- src/com/wimbli/WorldBorder/Config.java | 27 +++++--------------------- src/plugin.yml | 2 +- 3 files changed, 8 insertions(+), 26 deletions(-) diff --git a/nbproject/project.properties b/nbproject/project.properties index 037c94e..f7662e6 100644 --- a/nbproject/project.properties +++ b/nbproject/project.properties @@ -28,14 +28,12 @@ endorsed.classpath= excludes= file.reference.CalcTest-src=src file.reference.craftbukkit-0.0.1-SNAPSHOT.jar=lib/craftbukkit-0.0.1-SNAPSHOT.jar -file.reference.GroupManager.jar=lib\\GroupManager.jar file.reference.Permissions.jar=lib/Permissions.jar includes=** jar.compress=true javac.classpath=\ ${file.reference.craftbukkit-0.0.1-SNAPSHOT.jar}:\ - ${file.reference.Permissions.jar}:\ - ${file.reference.GroupManager.jar} + ${file.reference.Permissions.jar} # Space-separated list of extra javac options javac.compilerargs= javac.deprecation=false @@ -64,6 +62,7 @@ javadoc.windowtitle= main.class= manifest.file=manifest.mf meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false platform.active=default_platform run.classpath=\ ${javac.classpath}:\ diff --git a/src/com/wimbli/WorldBorder/Config.java b/src/com/wimbli/WorldBorder/Config.java index 6d8368b..8bd28f7 100644 --- a/src/com/wimbli/WorldBorder/Config.java +++ b/src/com/wimbli/WorldBorder/Config.java @@ -16,7 +16,6 @@ import org.bukkit.plugin.Plugin; import org.bukkit.util.config.Configuration; import org.bukkit.util.config.ConfigurationNode; -import org.anjocaido.groupmanager.GroupManager; import com.nijiko.permissions.PermissionHandler; import com.nijikokun.bukkit.Permissions.Permissions; @@ -27,7 +26,6 @@ public class Config private static WorldBorder plugin; private static Configuration cfg = null; private static PermissionHandler Permissions = null; - private static GroupManager GroupPlugin = null; private static final Logger mcLog = Logger.getLogger("Minecraft"); public static DecimalFormat coord = new DecimalFormat("0.0"); private static int borderTask = -1; @@ -249,28 +247,18 @@ public class Config public static void loadPermissions(WorldBorder plugin) { - if (GroupPlugin != null || Permissions != null || plugin == null) + if (Permissions != null || plugin == null) return; - // try GroupManager first - Plugin test = plugin.getServer().getPluginManager().getPlugin("GroupManager"); - - if (test != null) - { - GroupPlugin = (GroupManager) test; - LogConfig("Will use plugin for permissions: "+((GroupManager)test).getDescription().getFullName()); - return; - } - - // if GroupManager isn't available, try Permissions - test = plugin.getServer().getPluginManager().getPlugin("Permissions"); + // Check for Permissions plugin + Plugin test = plugin.getServer().getPluginManager().getPlugin("Permissions"); if (test != null) { Permissions = ((Permissions)test).getHandler(); LogConfig("Will use plugin for permissions: "+((Permissions)test).getDescription().getFullName()); } else { - LogConfig("Permissions plugin not found. Only Ops will have access to this plugin's commands."); + LogConfig("Permissions plugin not found. Defaulting to Bukkit's built-in SuperPerms system."); } } @@ -281,12 +269,7 @@ public class Config else if (player.isOp()) // Op, always permitted return true; - if (GroupPlugin != null) // GroupManager plugin available - { - if (GroupPlugin.getWorldsHolder().getWorldPermissions(player).has(player, "worldborder." + request)) - return true; - } - else if (Permissions != null) // Permissions plugin available + if (Permissions != null) // Permissions plugin available { if (Permissions.permission(player, "worldborder." + request)) return true; diff --git a/src/plugin.yml b/src/plugin.yml index 31a1139..08b8d34 100644 --- a/src/plugin.yml +++ b/src/plugin.yml @@ -1,7 +1,7 @@ name: WorldBorder author: Brettflan description: Efficient, feature-rich plugin for limiting the size of your worlds. -version: 1.4.2 +version: 1.4.3 main: com.wimbli.WorldBorder.WorldBorder softdepend: - Essentials