public boolean canSee(CommandSender sender) { if (!command.isRegistered() && !(command instanceof VanillaCommand)) { // Unregistered commands should not show up in the help (ignore VanillaCommands) return false; } if (sender instanceof ConsoleCommandSender) { return true; } if (amendedPermission != null) { return sender.hasPermission(amendedPermission); } else { return command.testPermissionSilent(sender); } }
private String getCommandPluginName(Command command) { if (command instanceof VanillaCommandWrapper) { return "Minecraft"; } if (command instanceof BukkitCommand || command instanceof VanillaCommand) { return "Bukkit"; } if (command instanceof PluginIdentifiableCommand) { return ((PluginIdentifiableCommand)command).getPlugin().getName(); } return null; }
private boolean commandInIgnoredPlugin(Command command, Set<String> ignoredPlugins) { if ((command instanceof BukkitCommand || command instanceof VanillaCommand) && ignoredPlugins.contains("Bukkit")) { return true; } if (command instanceof PluginIdentifiableCommand && ignoredPlugins.contains(((PluginIdentifiableCommand)command).getPlugin().getName())) { return true; } return false; }
private String getCommandPluginName(Command command) { if (command.getClass().equals(VanillaCommandWrapper.class)) { return "Minecraft"; } if (command.getClass().equals(BukkitCommand.class) || command.getClass().equals(VanillaCommand.class)) { return "Bukkit"; } if (command instanceof PluginIdentifiableCommand) { return ((PluginIdentifiableCommand)command).getPlugin().getName(); } return null; }
private boolean commandInIgnoredPlugin(Command command, Set<String> ignoredPlugins) { if ((command.getClass().equals(BukkitCommand.class) || command.getClass().equals(VanillaCommand.class)) && ignoredPlugins.contains("Bukkit")) { return true; } if (command instanceof PluginIdentifiableCommand && ignoredPlugins.contains(((PluginIdentifiableCommand)command).getPlugin().getName())) { return true; } return false; }
private String getCommandPluginName(Command command) { if (command instanceof BukkitCommand || command instanceof VanillaCommand) { return "Bukkit"; } if (command instanceof PluginIdentifiableCommand) { return ((PluginIdentifiableCommand)command).getPlugin().getName(); } return null; }