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

项目: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    文件:CraftBlockCommandSender.java   
public ICommandListener getTileEntity() {
    return commandBlock;
}
项目:Craftbukkit    文件:ProxiedNativeCommandSender.java   
public ProxiedNativeCommandSender(ICommandListener orig, CommandSender caller, CommandSender callee) {
    this.orig = orig;
    this.caller = caller;
    this.callee = callee;
}
项目:Craftbukkit    文件:ProxiedNativeCommandSender.java   
public ICommandListener getHandle() {
    return orig;
}
项目:Craftbukkit    文件:CraftBlockCommandSender.java   
public ICommandListener getTileEntity() {
    return commandBlock;
}
项目:Tweakkit-Server    文件:CraftBlockCommandSender.java   
public ICommandListener getTileEntity() {
    return commandBlock;
}
项目:SpigotSource    文件:ProxiedNativeCommandSender.java   
public ProxiedNativeCommandSender(ICommandListener orig, CommandSender caller, CommandSender callee) {
    this.orig = orig;
    this.caller = caller;
    this.callee = callee;
}
项目:SpigotSource    文件:ProxiedNativeCommandSender.java   
public ICommandListener getHandle() {
    return orig;
}
项目:SpigotSource    文件:CraftBlockCommandSender.java   
public CraftBlockCommandSender(ICommandListener commandBlockListenerAbstract) {
    super();
    this.block = commandBlockListenerAbstract;
}
项目:SpigotSource    文件:CraftBlockCommandSender.java   
public ICommandListener getTileEntity() {
    return block;
}