CommandAPI icon indicating copy to clipboard operation
CommandAPI copied to clipboard

The new annotation system should support multiple command executors

Open JorelAli opened this issue 3 years ago • 0 comments

Please describe your suggestion The new annotation system should support multiple command executors for a single command, similarly to how the CommandAPI does already

Please supply examples of the desired inputs and outputs Example: Input:

public class MyCommand {
  public void blah(ConsoleCommandSender sender) {
    // ...
  }

  public void blah(Player player) {
    // ...
  }
}

Output:

new CommandAPICommand("cmd")
  .executesConsole((sender, args) -> {
    // ...
  })
  .executesPlayer((player, args) -> {
    // ...
  })
  .register();

JorelAli avatar Jun 16 '22 10:06 JorelAli