Interface SpigotCommand<Msg>

Type Parameters:
Msg - the type of messages the command can produce
All Superinterfaces:
Command<SpigotCommandContext, Msg>
All Known Implementing Classes:
SendMessageCommand

public interface SpigotCommand<Msg> extends Command<SpigotCommandContext, Msg>
A command that can be executed in a Spigot GUI context.
  • Method Details

    • of

      static <Msg> SpigotCommand<Msg> of(Consumer<SpigotCommandContext> command)
      Wrap a simple consumer into a SpigotCommand.

      Note: Prefer creating specific commands where possible.

      Type Parameters:
      Msg - the type of messages the command can produce
      Parameters:
      command - the command to wrap
      Returns:
      the wrapped command
    • close

      static <Msg> SpigotCommand<Msg> close()
      A command that closes the inventory.
      Type Parameters:
      Msg - the type of messages the command can produce
      Returns:
      the close command