Java 类net.minecraft.server.RemoteControlCommandListener 实例源码

项目:CraftBukkit    文件:VanillaCommandWrapper.java   
private ICommandListener getListener(CommandSender sender) {
    if (sender instanceof Player) {
        return ((CraftPlayer) sender).getHandle();
    }
    if (sender instanceof BlockCommandSender) {
        return ((CraftBlockCommandSender) sender).getTileEntity();
    }
    if (sender instanceof CommandMinecart) {
        return ((EntityMinecartCommandBlock) ((CraftMinecartCommand) sender).getHandle()).getCommandBlock();
    }
    if (sender instanceof RemoteConsoleCommandSender) {
        return RemoteControlCommandListener.instance;
    }
    if (sender instanceof ConsoleCommandSender) {
        return ((CraftServer) sender.getServer()).getServer();
    }
    return null;
}
项目:Tweakkit-Server    文件:VanillaCommandWrapper.java   
private ICommandListener getListener(CommandSender sender) {
    if (sender instanceof Player) {
        return ((CraftPlayer) sender).getHandle();
    }
    if (sender instanceof BlockCommandSender) {
        return ((CraftBlockCommandSender) sender).getTileEntity();
    }
    if (sender instanceof CommandMinecart) {
        return ((EntityMinecartCommandBlock) ((CraftMinecartCommand) sender).getHandle()).getCommandBlock();
    }
    if (sender instanceof RemoteConsoleCommandSender) {
        return RemoteControlCommandListener.instance;
    }
    if (sender instanceof ConsoleCommandSender) {
        return ((CraftServer) sender.getServer()).getServer();
    }
    return null;
}
项目:CraftBukkit    文件:CraftRemoteConsoleCommandSender.java   
@Override
public void sendMessage(String message) {
    RemoteControlCommandListener.instance.sendMessage(message + "\n"); // Send a newline after each message, to preserve formatting.
}
项目:Craftbukkit    文件:CraftRemoteConsoleCommandSender.java   
@Override
public void sendMessage(String message) {
    RemoteControlCommandListener.getInstance().sendMessage(new ChatComponentText(message + "\n")); // Send a newline after each message, to preserve formatting.
}
项目:Almura-Server    文件:CraftRemoteConsoleCommandSender.java   
public void sendMessage(String message) {
    RemoteControlCommandListener.instance.sendMessage(ChatMessage.d(message + "\n")); // Send a newline after each message, to preserve formatting.
}
项目:Tweakkit-Server    文件:CraftRemoteConsoleCommandSender.java   
@Override
public void sendMessage(String message) {
    RemoteControlCommandListener.instance.sendMessage(message + "\n"); // Send a newline after each message, to preserve formatting.
}
项目:SpigotSource    文件:CraftRemoteConsoleCommandSender.java   
public CraftRemoteConsoleCommandSender(RemoteControlCommandListener listener) {
    this.listener = listener;
}
项目:Craft-city    文件:CraftRemoteConsoleCommandSender.java   
public void sendMessage(String message) {
    RemoteControlCommandListener.instance.sendMessage(message + "\n"); // Send a newline after each message, to preserve formatting.
}