Teach MinecraftServer how to handle Remote Console commands.
This fixes BUKKIT-220. Thanks for the help bawoodruff!
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
package org.bukkit.craftbukkit.command;
|
||||
|
||||
import net.minecraft.server.RemoteControlCommandListener;
|
||||
import org.bukkit.command.RemoteConsoleCommandSender;
|
||||
|
||||
public class CraftRemoteConsoleCommandSender extends ServerCommandSender implements RemoteConsoleCommandSender {
|
||||
public CraftRemoteConsoleCommandSender() {
|
||||
super();
|
||||
}
|
||||
|
||||
public void sendMessage(String message) {
|
||||
RemoteControlCommandListener.a.sendMessage(message);
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return "Rcon";
|
||||
}
|
||||
|
||||
public boolean isOp() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public void setOp(boolean value) {
|
||||
throw new UnsupportedOperationException("Cannot change operator status of remote controller.");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user