summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsnowleo <schneeleo@gmail.com>2011-08-28 14:12:27 +0200
committersnowleo <schneeleo@gmail.com>2011-08-28 14:12:27 +0200
commit22c277f9ab38f599ea0bee7798be32b86510943f (patch)
treef9ef649e068d6f0c95269fe30792bec26757d23a
parentfa423b3dd22d558885a3e25b6ea187e1b5e5eef2 (diff)
downloadEssentials-22c277f9ab38f599ea0bee7798be32b86510943f.tar
Essentials-22c277f9ab38f599ea0bee7798be32b86510943f.tar.gz
Essentials-22c277f9ab38f599ea0bee7798be32b86510943f.tar.lz
Essentials-22c277f9ab38f599ea0bee7798be32b86510943f.tar.xz
Essentials-22c277f9ab38f599ea0bee7798be32b86510943f.zip
If PermissionsBukkit or bPermissions is detected, we don't need the config switch.
-rw-r--r--Essentials/src/com/earth2me/essentials/EssentialsPluginListener.java39
1 files changed, 18 insertions, 21 deletions
diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPluginListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPluginListener.java
index 6d895082f..cd969a10c 100644
--- a/Essentials/src/com/earth2me/essentials/EssentialsPluginListener.java
+++ b/Essentials/src/com/earth2me/essentials/EssentialsPluginListener.java
@@ -58,33 +58,30 @@ public class EssentialsPluginListener extends ServerListener implements IConf
final Plugin permissionsPlugin = pm.getPlugin("Permissions");
if (permissionsPlugin == null || !permissionsPlugin.isEnabled())
{
- if (ess.getSettings().useBukkitPermissions())
+ final Plugin permissionsBukkitPlugin = pm.getPlugin("PermissionsBukkit");
+ final Plugin bPermissionsPlugin = pm.getPlugin("bPermissions");
+ if (permissionsBukkitPlugin != null && permissionsBukkitPlugin.isEnabled())
{
- final Plugin permissionsBukkitPlugin = pm.getPlugin("PermissionsBukkit");
- final Plugin bPermissionsPlugin = pm.getPlugin("bPermissions");
- if (permissionsBukkitPlugin != null && permissionsBukkitPlugin.isEnabled())
+ if (!(ess.getPermissionsHandler() instanceof PermissionsBukkitHandler))
{
- if (!(ess.getPermissionsHandler() instanceof PermissionsBukkitHandler))
- {
- LOGGER.log(Level.INFO, "Essentials: Using PermissionsBukkit based permissions.");
- ess.setPermissionsHandler(new PermissionsBukkitHandler(permissionsBukkitPlugin));
- }
+ LOGGER.log(Level.INFO, "Essentials: Using PermissionsBukkit based permissions.");
+ ess.setPermissionsHandler(new PermissionsBukkitHandler(permissionsBukkitPlugin));
}
- else if (bPermissionsPlugin != null && bPermissionsPlugin.isEnabled())
+ }
+ else if (bPermissionsPlugin != null && bPermissionsPlugin.isEnabled())
+ {
+ if (!(ess.getPermissionsHandler() instanceof BPermissionsHandler))
{
- if (!(ess.getPermissionsHandler() instanceof BPermissionsHandler))
- {
- LOGGER.log(Level.INFO, "Essentials: Using bPermissions based permissions.");
- ess.setPermissionsHandler(new BPermissionsHandler());
- }
+ LOGGER.log(Level.INFO, "Essentials: Using bPermissions based permissions.");
+ ess.setPermissionsHandler(new BPermissionsHandler());
}
- else
+ }
+ else if (ess.getSettings().useBukkitPermissions())
+ {
+ if (!(ess.getPermissionsHandler() instanceof SuperpermsHandler))
{
- if (!(ess.getPermissionsHandler() instanceof SuperpermsHandler))
- {
- LOGGER.log(Level.INFO, "Essentials: Using superperms based permissions.");
- ess.setPermissionsHandler(new SuperpermsHandler());
- }
+ LOGGER.log(Level.INFO, "Essentials: Using superperms based permissions.");
+ ess.setPermissionsHandler(new SuperpermsHandler());
}
}
else