Interface CommandHandler


public interface CommandHandler
Handles the registration and execution of commands.
  • Method Details

    • register

      @NotNull @NotNull CommandHandler register(@NotNull @NotNull com.mojang.brigadier.tree.LiteralCommandNode<CommandSource> node)
      Registers the command.
      Parameters:
      node - the command node to register
      Returns:
      this command handler
      Since:
      1.0.0
    • execute

      void execute(@NotNull @NotNull CommandSource source, @NotNull @NotNull String command)
      Executes the command as the specified CommandSource.
      Parameters:
      source - the source of the command
      command - the command to run
      Since:
      1.0.0