2011-04-05 15:57:54 +00:00
|
|
|
package com.earth2me.essentials;
|
|
|
|
|
|
|
|
import org.bukkit.Server;
|
|
|
|
import org.bukkit.command.CommandSender;
|
|
|
|
|
2011-10-06 09:54:09 +00:00
|
|
|
|
|
|
|
public final class Console implements IReplyTo
|
|
|
|
{
|
2011-04-05 15:57:54 +00:00
|
|
|
private static Console instance = new Console();
|
2013-10-16 19:59:39 +00:00
|
|
|
private CommandSource replyTo;
|
2011-04-05 15:57:54 +00:00
|
|
|
public final static String NAME = "Console";
|
2011-10-06 09:54:09 +00:00
|
|
|
|
|
|
|
private Console()
|
|
|
|
{
|
2011-04-05 15:57:54 +00:00
|
|
|
}
|
2011-10-06 09:54:09 +00:00
|
|
|
|
|
|
|
public static CommandSender getCommandSender(Server server) throws Exception
|
|
|
|
{
|
|
|
|
return server.getConsoleSender();
|
2011-04-05 15:57:54 +00:00
|
|
|
}
|
|
|
|
|
2011-11-18 18:07:28 +00:00
|
|
|
@Override
|
2013-10-16 19:59:39 +00:00
|
|
|
public void setReplyTo(CommandSource user)
|
2011-10-06 09:54:09 +00:00
|
|
|
{
|
2011-04-05 15:57:54 +00:00
|
|
|
replyTo = user;
|
|
|
|
}
|
|
|
|
|
2011-11-18 18:07:28 +00:00
|
|
|
@Override
|
2013-10-16 19:59:39 +00:00
|
|
|
public CommandSource getReplyTo()
|
2011-10-06 09:54:09 +00:00
|
|
|
{
|
2011-04-05 15:57:54 +00:00
|
|
|
return replyTo;
|
|
|
|
}
|
2011-10-06 09:54:09 +00:00
|
|
|
|
|
|
|
public static Console getConsoleReplyTo()
|
|
|
|
{
|
2011-04-05 15:57:54 +00:00
|
|
|
return instance;
|
|
|
|
}
|
|
|
|
}
|