1.15.2 plugin.yml code help

Discussion in 'Spigot Plugin Development' started by LittleCham, Feb 22, 2020.

  1. onEnable() you need to register the command...
     
  2. Code (Text):
    this.getCommand("Command").setExecutor(new MyClass(this));
    Try that on "onEnable()" and do the commands on other class
     
  3. Or use the same class and use setExecutor(this)
     
    • Agree Agree x 1
  4. Code (Java):
    this.getCommand("yourcommand").setExecutor((CommandExecutor)new YourClass());
     
  5. Do not cast it to commandexecutor, let your class implements CommandExecutor