mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-17 03:54:19 +02:00
Cleanup of Console class
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
@@ -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);
|
||||
|
@@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user