summaryrefslogtreecommitdiffstats
path: root/EssentialsXMPP/src/com/earth2me/essentials/xmpp/EssentialsXMPP.java
diff options
context:
space:
mode:
Diffstat (limited to 'EssentialsXMPP/src/com/earth2me/essentials/xmpp/EssentialsXMPP.java')
-rw-r--r--EssentialsXMPP/src/com/earth2me/essentials/xmpp/EssentialsXMPP.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/EssentialsXMPP.java b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/EssentialsXMPP.java
index b5c011e55..fea8dd2e2 100644
--- a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/EssentialsXMPP.java
+++ b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/EssentialsXMPP.java
@@ -1,8 +1,10 @@
package com.earth2me.essentials.xmpp;
+import com.earth2me.essentials.commands.EssentialsCommandHandler;
import static com.earth2me.essentials.I18n._;
-import com.earth2me.essentials.IEssentials;
-import com.earth2me.essentials.IUser;
+import com.earth2me.essentials.api.ICommandHandler;
+import com.earth2me.essentials.api.IEssentials;
+import com.earth2me.essentials.api.IUser;
import java.util.List;
import java.util.Locale;
import java.util.logging.Level;
@@ -21,6 +23,7 @@ public class EssentialsXMPP extends JavaPlugin implements IEssentialsXMPP
private transient UserManager users;
private transient XMPPManager xmpp;
private transient IEssentials ess;
+ private transient ICommandHandler commandHandler;
public static IEssentialsXMPP getInstance()
{
@@ -33,7 +36,7 @@ public class EssentialsXMPP extends JavaPlugin implements IEssentialsXMPP
instance = this;
final PluginManager pluginManager = getServer().getPluginManager();
- ess = (IEssentials)pluginManager.getPlugin("Essentials");
+ ess = (IEssentials)pluginManager.getPlugin("Essentials3");
if (!this.getDescription().getVersion().equals(ess.getDescription().getVersion()))
{
LOGGER.log(Level.WARNING, _("versionMismatchAll"));
@@ -52,6 +55,8 @@ public class EssentialsXMPP extends JavaPlugin implements IEssentialsXMPP
ess.addReloadListener(users);
ess.addReloadListener(xmpp);
+
+ commandHandler = new EssentialsCommandHandler(EssentialsXMPP.class.getClassLoader(), "com.earth2me.essentials.xmpp.Command", "essentials.", ess);
}
@Override
@@ -67,7 +72,7 @@ public class EssentialsXMPP extends JavaPlugin implements IEssentialsXMPP
@Override
public boolean onCommand(final CommandSender sender, final Command command, final String commandLabel, final String[] args)
{
- return ess.onCommandEssentials(sender, command, commandLabel, args, EssentialsXMPP.class.getClassLoader(), "com.earth2me.essentials.xmpp.Command", "essentials.", null);
+ return commandHandler.handleCommand(sender, command, commandLabel, args);
}
@Override