コード例 #1
0
  public DynamicCommand(Plugin plugin, String name, String description, CommandExecutor exec) {
    super(name);
    super.setDescription(description);

    this.plugin = plugin;
    this.exec = exec;
  }
コード例 #2
0
ファイル: ACommand.java プロジェクト: Bindernews/Fast-Titles
 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);
   }
 }