/FileExtraction/Java_unseen/Wind-Development_WindSpigot/WindSpigot-Server/src/main/java/org/bukkit/craftbukkit/command/CraftRemoteConsoleCommandSender.java
package org.bukkit.craftbukkit.command;

import org.bukkit.command.RemoteConsoleCommandSender;

import net.minecraft.server.ChatComponentText;
import net.minecraft.server.RemoteControlCommandListener;

public class CraftRemoteConsoleCommandSender extends ServerCommandSender implements RemoteConsoleCommandSender {
	public CraftRemoteConsoleCommandSender() {
		super();
	}

	@Override
	public void sendMessage(String message) {
		RemoteControlCommandListener.getInstance().sendMessage(new ChatComponentText(message + "\n")); // Send a newline
																										// after each
																										// message, to
																										// preserve
																										// formatting.
	}

	@Override
	public void sendMessage(String[] messages) {
		for (String message : messages) {
			sendMessage(message);
		}
	}

	@Override
	public String getName() {
		return "Rcon";
	}

	@Override
	public boolean isOp() {
		return true;
	}

	@Override
	public void setOp(boolean value) {
		throw new UnsupportedOperationException("Cannot change operator status of remote controller.");
	}
}
