diff options
author | snowleo <schneeleo@gmail.com> | 2011-06-07 01:08:31 +0200 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2011-06-07 01:08:31 +0200 |
commit | d8a81923b1bd3f42add1fd096604a3b2ef2506d5 (patch) | |
tree | 30eb52ebb75a5a2025bd82bbed8931e0b53300f4 /EssentialsXMPP/src | |
parent | 1321f8de5d400ad7ff6acd6dbc9bb78303439baa (diff) | |
download | Essentials-d8a81923b1bd3f42add1fd096604a3b2ef2506d5.tar Essentials-d8a81923b1bd3f42add1fd096604a3b2ef2506d5.tar.gz Essentials-d8a81923b1bd3f42add1fd096604a3b2ef2506d5.tar.lz Essentials-d8a81923b1bd3f42add1fd096604a3b2ef2506d5.tar.xz Essentials-d8a81923b1bd3f42add1fd096604a3b2ef2506d5.zip |
Only import what we really need.
Diffstat (limited to 'EssentialsXMPP/src')
-rw-r--r-- | EssentialsXMPP/src/com/earth2me/essentials/xmpp/XMPPManager.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/XMPPManager.java b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/XMPPManager.java index d057f5ddf..537a32a5e 100644 --- a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/XMPPManager.java +++ b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/XMPPManager.java @@ -1,5 +1,6 @@ package com.earth2me.essentials.xmpp; +import com.earth2me.essentials.Console; import com.earth2me.essentials.EssentialsConf; import com.earth2me.essentials.IConf; import java.io.File; @@ -12,8 +13,6 @@ import java.util.logging.Handler; import java.util.logging.Level; import java.util.logging.LogRecord; import java.util.logging.Logger; -import org.bukkit.command.ConsoleCommandSender; -import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Player; import org.bukkit.plugin.java.JavaPlugin; import org.jivesoftware.smack.Chat; @@ -271,10 +270,13 @@ public class XMPPManager extends Handler implements MessageListener, ChatManager { if (config.getStringList("op-users", new ArrayList<String>()).contains(StringUtils.parseBareAddress(chat.getParticipant()))) { - final CraftServer craftServer = (CraftServer)parent.getServer(); - if (craftServer != null) + try + { + parent.getServer().dispatchCommand(Console.getCommandSender(parent.getServer()), message.substring(1)); + } + catch (Exception ex) { - craftServer.dispatchCommand(new ConsoleCommandSender(craftServer), message.substring(1)); + LOGGER.log(Level.SEVERE, ex.getMessage(), ex); } } } |