diff options
author | snowleo <schneeleo@gmail.com> | 2012-01-06 01:55:27 +0100 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2012-01-06 01:55:41 +0100 |
commit | cc3cd5e89c7beb92373aefcdf8386e701ff32792 (patch) | |
tree | 4cd2ff153c95aa4d0dafd0279d1c1b03f3da265f | |
parent | 3513d72a7b883701ba8d90c523da5af8bf4d0d07 (diff) | |
download | Essentials-cc3cd5e89c7beb92373aefcdf8386e701ff32792.tar Essentials-cc3cd5e89c7beb92373aefcdf8386e701ff32792.tar.gz Essentials-cc3cd5e89c7beb92373aefcdf8386e701ff32792.tar.lz Essentials-cc3cd5e89c7beb92373aefcdf8386e701ff32792.tar.xz Essentials-cc3cd5e89c7beb92373aefcdf8386e701ff32792.zip |
Cleanup of Console class
3 files changed, 2 insertions, 9 deletions
diff --git a/Essentials/src/com/earth2me/essentials/Console.java b/Essentials/src/com/earth2me/essentials/Console.java index 5bdfd5990..2e43883cf 100644 --- a/Essentials/src/com/earth2me/essentials/Console.java +++ b/Essentials/src/com/earth2me/essentials/Console.java @@ -1,7 +1,6 @@ package com.earth2me.essentials; import com.earth2me.essentials.api.IReplyTo; -import org.bukkit.Server; import org.bukkit.command.CommandSender; @@ -15,11 +14,6 @@ public final class Console implements IReplyTo { } - public static CommandSender getCommandSender(final Server server) throws Exception - { - return server.getConsoleSender(); - } - @Override public void setReplyTo(final CommandSender user) { diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandmsg.java b/Essentials/src/com/earth2me/essentials/commands/Commandmsg.java index 2b513d9c0..87445e11b 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandmsg.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandmsg.java @@ -40,7 +40,7 @@ public class Commandmsg extends EssentialsCommand if (args[0].equalsIgnoreCase(Console.NAME)) { sender.sendMessage(_("msgFormat", translatedMe, Console.NAME, message)); - CommandSender cs = Console.getCommandSender(server); + CommandSender cs = server.getConsoleSender(); cs.sendMessage(_("msgFormat", senderName, translatedMe, message)); replyTo.setReplyTo(cs); Console.getConsoleReplyTo().setReplyTo(sender); diff --git a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/XMPPManager.java b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/XMPPManager.java index 95d4c4620..eb321ca81 100644 --- a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/XMPPManager.java +++ b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/XMPPManager.java @@ -1,6 +1,5 @@ package com.earth2me.essentials.xmpp; -import com.earth2me.essentials.Console; import com.earth2me.essentials.EssentialsConf; import com.earth2me.essentials.api.IReload; import com.earth2me.essentials.api.IUser; @@ -355,7 +354,7 @@ public class XMPPManager extends Handler implements MessageListener, ChatManager { try { - parent.getServer().dispatchCommand(Console.getCommandSender(parent.getServer()), message.substring(1)); + parent.getServer().dispatchCommand(parent.getServer().getConsoleSender(), message.substring(1)); } catch (Exception ex) { |