Interface CommandFactory<C>

Type Parameters:
C - the command sender type
All Known Implementing Classes:
CommandBean
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@API(status=STABLE) @FunctionalInterface public interface CommandFactory<C>
Factory producing command instances
  • Method Details

    • createCommands

      @NonNull List<@NonNull Command<? extends C>> createCommands(@NonNull CommandManager<C> commandManager)
      Creates commands using the given commandManager. Each invocation produces unique instances of the commands.

      This method has no side effects, meaning that the created commands will not be automatically registered to the command manager.

      Parameters:
      commandManager - the command manager
      Returns:
      the created commands