summaryrefslogtreecommitdiffstats
path: root/Essentials/src/com/earth2me/essentials/Console.java
blob: 3954bbb0f0d859a561281bf6d38a6953161f80ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package com.earth2me.essentials;

import org.bukkit.Server;
import org.bukkit.command.CommandSender;


public final class Console implements IReplyTo
{
	private static final Console instance = new Console();
	private CommandSource replyTo;
	public final static String NAME = "Console";

	private Console()
	{
	}

	public static CommandSender getCommandSender(Server server) throws Exception
	{
		return server.getConsoleSender();
	}

	@Override
	public void setReplyTo(CommandSource user)
	{
		replyTo = user;
	}

	@Override
	public CommandSource getReplyTo()
	{
		return replyTo;
	}

	public static Console getConsoleReplyTo()
	{
		return instance;
	}
}