public DynamicCommand(Plugin plugin, String name, String description, CommandExecutor exec) {
    super(name);
    super.setDescription(description);

    this.plugin = plugin;
    this.exec = exec;
  }
Ejemplo n.º 2
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);
   }
 }