Beispiel #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);
   }
 }
  public DynamicCommand(
      Plugin plugin,
      String name,
      String description,
      String usage,
      CommandExecutor exec,
      String... aliases) {
    this(plugin, name, description, exec, aliases);

    super.setUsage(usage);
    super.setAliases(Arrays.asList(aliases));
  }
  public DynamicCommand(
      Plugin plugin, String name, String description, String usage, CommandExecutor exec) {
    this(plugin, name, description, exec);

    super.setUsage(usage);
  }