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 Details

    • handle

      boolean handle(SetupContext context)
      Handle a setup command.
      Parameters:
      context - Command context with sender, arena, args, etc.
      Returns:
      true if command was handled successfully
    • tabComplete

      TabCompleteResult tabComplete(TabCompleteContext context)
      Provide tab completion suggestions.
      Parameters:
      context - Tab completion context
      Returns:
      Tab completion result with suggestions
    • getSubcommands

      List<String> 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

      default boolean validateConfig(SetupContext context)
      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