31 lines
714 B
Java
31 lines
714 B
Java
package org.bukkit.craftbukkit.command;
|
|
|
|
import org.bukkit.ChatColor;
|
|
import org.bukkit.command.ConsoleCommandSender;
|
|
|
|
/**
|
|
* Represents CLI input from a console
|
|
*/
|
|
public class CraftConsoleCommandSender extends ServerCommandSender implements ConsoleCommandSender {
|
|
|
|
protected CraftConsoleCommandSender() {
|
|
super();
|
|
}
|
|
|
|
public void sendMessage(String message) {
|
|
System.out.println(ChatColor.stripColor(message));
|
|
}
|
|
|
|
public String getName() {
|
|
return "CONSOLE";
|
|
}
|
|
|
|
public boolean isOp() {
|
|
return true;
|
|
}
|
|
|
|
public void setOp(boolean value) {
|
|
throw new UnsupportedOperationException("Cannot change operator status of server console");
|
|
}
|
|
}
|