Exemple #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;
  }
Exemple #2
0
  public AddonCommand getAddonCommand(String name) {
    Command command = commandMap.getCommand(name);

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