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; }
public ICommandListener getTileEntity() { return commandBlock; }
public ProxiedNativeCommandSender(ICommandListener orig, CommandSender caller, CommandSender callee) { this.orig = orig; this.caller = caller; this.callee = callee; }
public ICommandListener getHandle() { return orig; }
public CraftBlockCommandSender(ICommandListener commandBlockListenerAbstract) { super(); this.block = commandBlockListenerAbstract; }
public ICommandListener getTileEntity() { return block; }