Package net.blueva.arcade.api.setup
Interface GameSetupHandler
public interface GameSetupHandler
Interface for game-specific setup command handlers.
Each game module implements this to handle its own configuration commands.
Example: RaceSetup handles "finishline" commands for race game
-
Method Summary
Modifier and TypeMethodDescriptionGet list of subcommands this handler supports.booleanhandle(SetupContext context) Handle a setup command.tabComplete(TabCompleteContext context) Provide tab completion suggestions.default booleanvalidateConfig(SetupContext context) Validates if the game is fully configured and can be enabled.
-
Method Details
-
handle
Handle a setup command.- Parameters:
context- Command context with sender, arena, args, etc.- Returns:
- true if command was handled successfully
-
tabComplete
Provide tab completion suggestions.- Parameters:
context- Tab completion context- Returns:
- Tab completion result with suggestions
-
getSubcommands
Get list of subcommands this handler supports. Used for help messages and validation. Common subcommands are handled by core (bounds, spawn, time, etc.) Only return game-specific subcommands here.- Returns:
- List of supported subcommands (e.g., ["finishline", "laps"])
-
validateConfig
Validates if the game is fully configured and can be enabled.This method is called by the core system when attempting to enable an arena. Game modules can implement custom validation logic to ensure all required configuration is present before allowing the arena to be activated.
- Parameters:
context- setup context with data access for validation- Returns:
- true if the game is properly configured, false otherwise
-