summaryrefslogtreecommitdiffstats
path: root/EssentialsPermissionsCommands/src
diff options
context:
space:
mode:
authorsnowleo <schneeleo@gmail.com>2011-07-16 01:33:22 +0200
committersnowleo <schneeleo@gmail.com>2011-07-16 01:33:22 +0200
commit616b880e13fd07d880e934f394427df6fa2be5df (patch)
tree0c8d89dd654c80bbe64d554bd1198032ca6aec28 /EssentialsPermissionsCommands/src
parent372f88757b6f703885586895c98bfdeb74bbc7e7 (diff)
downloadEssentials-616b880e13fd07d880e934f394427df6fa2be5df.tar
Essentials-616b880e13fd07d880e934f394427df6fa2be5df.tar.gz
Essentials-616b880e13fd07d880e934f394427df6fa2be5df.tar.lz
Essentials-616b880e13fd07d880e934f394427df6fa2be5df.tar.xz
Essentials-616b880e13fd07d880e934f394427df6fa2be5df.zip
Heavy cleanup of all classes
ItemDb is not static anymore Essentials.getStatic() removed
Diffstat (limited to 'EssentialsPermissionsCommands/src')
-rw-r--r--EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/EssentialsPermissionsCommands.java16
1 files changed, 14 insertions, 2 deletions
diff --git a/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/EssentialsPermissionsCommands.java b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/EssentialsPermissionsCommands.java
index a9651cd31..0f126afb6 100644
--- a/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/EssentialsPermissionsCommands.java
+++ b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/EssentialsPermissionsCommands.java
@@ -1,8 +1,11 @@
package com.earth2me.essentials.permissions;
-import com.earth2me.essentials.Essentials;
+import com.earth2me.essentials.IEssentials;
+import com.earth2me.essentials.Util;
import com.nijiko.permissions.PermissionHandler;
import com.nijikokun.bukkit.Permissions.Permissions;
+import java.util.logging.Level;
+import java.util.logging.Logger;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.plugin.Plugin;
@@ -13,6 +16,8 @@ import org.bukkit.plugin.java.JavaPlugin;
public class EssentialsPermissionsCommands extends JavaPlugin
{
private static PermissionHandler permissionHandler = null;
+ private static final Logger LOGGER = Logger.getLogger("Minecraft");
+ private IEssentials ess;
public static PermissionHandler getPermissionHandler()
{
@@ -30,12 +35,19 @@ public class EssentialsPermissionsCommands extends JavaPlugin
{
permissionHandler = ((Permissions)permissionsPlugin).getHandler();
}
+ ess = (IEssentials)pluginManager.getPlugin("Essentials");
+
+ if (!this.getDescription().getVersion().equals(ess.getDescription().getVersion())) {
+ LOGGER.log(Level.WARNING, Util.i18n("versionMismatchAll"));
+ }
+ LOGGER.info(Util.format("loadinfo", this.getDescription().getName(), this.getDescription().getVersion(), "essentials team"));
+
}
@Override
public boolean onCommand(final CommandSender sender, final Command command, final String label, final String[] args)
{
- return Essentials.getStatic().onCommandEssentials(sender, command, label, args, EssentialsPermissionsCommands.class.getClassLoader(), "com.earth2me.essentials.permissions.Command", "groupmanager.");
+ return ess.onCommandEssentials(sender, command, label, args, Thread.currentThread().getContextClassLoader(), "com.earth2me.essentials.permissions.Command", "groupmanager.");
}
@Override