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 TypeMethodDescriptioncloud.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.voidexecute(cloud.commandframework.context.CommandContext<UserAudience> context) Called when the command created inbuildCommand(CommandManager)is executed.default booleanshouldRegister(FloodgateConfig config) 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
Called when the command created inbuildCommand(CommandManager)is executed.- Parameters:
context- the context of the executed command
-
shouldRegister
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
-