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

This commit is contained in:
Brettflan 2011-09-22 02:19:57 -05:00
parent 818b06be52
commit 4620b0eac0
3 changed files with 8 additions and 26 deletions

View File

@ -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}:\

View File

@ -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;

View File

@ -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