Ejemplo n.º 1
0
 public void setAsExecutor(Command cmd) {
   cmd.setDescription(annot.desc());
   cmd.setUsage(annot.usage());
   cmd.setPermission(annot.permission());
   cmd.setAliases(new ArrayList<String>(Arrays.asList(annot.alias())));
   if (cmd instanceof PluginCommand) {
     PluginCommand pcmd = ((PluginCommand) cmd);
     pcmd.setExecutor(this);
     pcmd.setTabCompleter(this);
   }
 }
Ejemplo n.º 2
0
  @Override
  public void registerCommands() {
    new MainCommand();
    MainCommand.subCommands.add(new Template());
    MainCommand.subCommands.add(new Setup());
    MainCommand.subCommands.add(new DebugUUID());
    MainCommand.subCommands.add(new DebugFill());
    MainCommand.subCommands.add(new DebugSaveTest());
    MainCommand.subCommands.add(new DebugLoadTest());
    MainCommand.subCommands.add(new CreateRoadSchematic());
    MainCommand.subCommands.add(new RegenAllRoads());
    MainCommand.subCommands.add(new DebugClear());
    MainCommand.subCommands.add(new Claim());
    MainCommand.subCommands.add(new Auto());
    MainCommand.subCommands.add(new Home());
    MainCommand.subCommands.add(new Visit());
    MainCommand.subCommands.add(new TP());
    MainCommand.subCommands.add(new Set());
    MainCommand.subCommands.add(new Toggle());
    MainCommand.subCommands.add(new Clear());
    MainCommand.subCommands.add(new Delete());
    MainCommand.subCommands.add(new SetOwner());
    if (Settings.ENABLE_CLUSTERS) {
      MainCommand.subCommands.add(new Cluster());
    }

    MainCommand.subCommands.add(new Trust());
    MainCommand.subCommands.add(new Add());
    MainCommand.subCommands.add(new Deny());
    MainCommand.subCommands.add(new Untrust());
    MainCommand.subCommands.add(new Remove());
    MainCommand.subCommands.add(new Undeny());

    MainCommand.subCommands.add(new Info());
    MainCommand.subCommands.add(new list());
    MainCommand.subCommands.add(new Help());
    MainCommand.subCommands.add(new Debug());
    MainCommand.subCommands.add(new SchematicCmd());
    MainCommand.subCommands.add(new plugin());
    MainCommand.subCommands.add(new Inventory());
    MainCommand.subCommands.add(new Purge());
    MainCommand.subCommands.add(new Reload());
    MainCommand.subCommands.add(new Merge());
    MainCommand.subCommands.add(new Unlink());
    MainCommand.subCommands.add(new Kick());
    MainCommand.subCommands.add(new Rate());
    MainCommand.subCommands.add(new DebugClaimTest());
    MainCommand.subCommands.add(new Inbox());
    MainCommand.subCommands.add(new Comment());
    MainCommand.subCommands.add(new Database());
    MainCommand.subCommands.add(new Unclaim());
    MainCommand.subCommands.add(new Swap());
    MainCommand.subCommands.add(new MusicSubcommand());
    MainCommand.subCommands.add(new DebugRoadRegen());
    MainCommand.subCommands.add(new Trim());
    MainCommand.subCommands.add(new DebugExec());
    MainCommand.subCommands.add(new FlagCmd());
    MainCommand.subCommands.add(new Target());
    MainCommand.subCommands.add(new DebugFixFlags());
    MainCommand.subCommands.add(new Move());
    MainCommand.subCommands.add(new Condense());
    MainCommand.subCommands.add(new Confirm());
    MainCommand.subCommands.add(new Copy());
    MainCommand.subCommands.add(new Chat());
    final BukkitCommand bcmd = new BukkitCommand();
    final PluginCommand plotCommand = getCommand("plots");
    plotCommand.setExecutor(bcmd);
    plotCommand.setAliases(Arrays.asList("p", "ps", "plotme", "plot"));
    plotCommand.setTabCompleter(bcmd);
  }