Пример #1
0
  public boolean dispatchCommand(CommandSender sender, String commandLine) {
    if (commandMap.dispatch(sender, commandLine)) {
      return true;
    }
    sender.sendMessage("Unknown command. Type \"help\" for help.");

    return false;
  }
Пример #2
0
  public AddonCommand getAddonCommand(String name) {
    Command command = commandMap.getCommand(name);

    if (command instanceof AddonCommand) {
      return (AddonCommand) command;
    } else {
      return null;
    }
  }