Interface FloodgateCommand

All Known Implementing Classes:
LinkAccountCommand, MainCommand, TestCommand, UnlinkAccountCommand, WhitelistCommand

public interface FloodgateCommand
The base class for every Floodgate command.
  • Method Summary

    Modifier and Type
    Method
    Description
    cloud.commandframework.Command<UserAudience>
    buildCommand(cloud.commandframework.CommandManager<UserAudience> commandManager)
    Called by the CommandRegister when it wants you to build the command which he can add.
    void
    execute(cloud.commandframework.context.CommandContext<UserAudience> context)
    Called when the command created in buildCommand(CommandManager) is executed.
    default boolean
    Called by the CommandRegister to check if the command should be added given the config.
  • Method Details

    • buildCommand

      cloud.commandframework.Command<UserAudience> buildCommand(cloud.commandframework.CommandManager<UserAudience> commandManager)
      Called by the CommandRegister when it wants you to build the command which he can add.
      Parameters:
      commandManager - the manager to create a command
      Returns:
      the command to register
    • execute

      void execute(cloud.commandframework.context.CommandContext<UserAudience> context)
      Called when the command created in buildCommand(CommandManager) is executed.
      Parameters:
      context - the context of the executed command
    • shouldRegister

      default boolean shouldRegister(FloodgateConfig config)
      Called by the CommandRegister to check if the command should be added given the config.
      Parameters:
      config - the config to check if a command should be added
      Returns:
      true if it should be added