diff --git a/src/main/java/org/bukkit/craftbukkit/command/CraftSimpleCommandMap.java b/src/main/java/org/bukkit/craftbukkit/command/CraftSimpleCommandMap.java index afb441e..0722da3 100644 --- a/src/main/java/org/bukkit/craftbukkit/command/CraftSimpleCommandMap.java +++ b/src/main/java/org/bukkit/craftbukkit/command/CraftSimpleCommandMap.java @@ -5,12 +5,14 @@ import static org.bukkit.util.Java15Compat.Arrays_copyOfRange; import java.util.regex.Pattern; import net.minecraft.command.ICommandSender; +import net.minecraft.network.rcon.RConConsoleSource; import org.bukkit.Server; import org.bukkit.command.Command; import org.bukkit.command.CommandException; import org.bukkit.command.CommandSender; import org.bukkit.command.ConsoleCommandSender; +import org.bukkit.command.RemoteConsoleCommandSender; import org.bukkit.command.SimpleCommandMap; import org.bukkit.craftbukkit.entity.CraftPlayer; @@ -50,6 +52,9 @@ public class CraftSimpleCommandMap extends SimpleCommandMap { { FMLCommonHandler.instance().getMinecraftServerInstance().getCommandManager().executeCommand(this.vanillaConsoleSender, commandLine); } + else if (sender instanceof RemoteConsoleCommandSender){ + FMLCommonHandler.instance().getMinecraftServerInstance().getCommandManager().executeCommand(RConConsoleSource.instance, commandLine); + } else FMLCommonHandler.instance().getMinecraftServerInstance().getCommandManager().executeCommand(((CraftPlayer)sender).getHandle(), commandLine); } else {