- Common ways to obtain PluginCommand
private void myMethod () {PluginCommand p =
String name;Bukkit.getPluginCommand(name)
Constructor function Object() { [native code] };Object[] initargs;function Object() { [native code] }.newInstance(initargs, plugin)
- Smart code suggestions by Codota
}
if (pluginCommand == null || pluginCommand.getAliases() == null) { return Arrays.asList(commandName.toLowerCase() + commandParameters); List<String> equivalentCommands = new ArrayList<>(pluginCommand.getAliases().size() + 1); for (String alias : pluginCommand.getAliases()) { equivalentCommands.add(alias.toLowerCase() + commandParameters);
/** * Checks if the label given is a possible label of the command. * * @param command The command to check against. * @param label The label that should be checked if it's a label for the * command. * @return {@code true} if the label is a label of the command, {@code false} if * it's not. */ private boolean isLabelOfCommand(PluginCommand command, String label) { assertMainThread(); if (label.equals(command.getName())) { return true; } for (String alias : command.getAliases()) { if (label.equals(alias)) { return true; } } return false; }