Class GameConfig

java.lang.Object
com.ohacd.matchbox.api.GameConfig

public final class GameConfig extends Object
Configuration class for game sessions.

Provides customizable settings for game duration, abilities, cosmetics, and other game behavior. Use the Builder class to create custom configurations.

Example usage:


 GameConfig config = new GameConfig.Builder()
     .swipeDuration(120) // 2 minutes
     .sparkAbility("hunter_vision") // Force specific ability
     .randomSkins(true)
     .build();
 
Since:
0.9.5
  • Constructor Details

    • GameConfig

      public GameConfig(int swipeDuration, int discussionDuration, int votingDuration, String sparkSecondaryAbility, String medicSecondaryAbility, boolean randomSkinsEnabled, boolean useSteveSkins)
      Creates a new game configuration.
      Parameters:
      swipeDuration - duration of swipe phase in seconds
      discussionDuration - duration of discussion phase in seconds
      votingDuration - duration of voting phase in seconds
      sparkSecondaryAbility - Spark's secondary ability setting
      medicSecondaryAbility - Medic's secondary ability setting
      randomSkinsEnabled - whether to use random skins
      useSteveSkins - whether to force Steve skins
  • Method Details

    • getSwipeDuration

      public int getSwipeDuration()
      Gets the swipe phase duration in seconds.
      Returns:
      swipe duration, must be positive
    • getDiscussionDuration

      public int getDiscussionDuration()
      Gets the discussion phase duration in seconds.
      Returns:
      discussion duration, must be positive
    • getVotingDuration

      public int getVotingDuration()
      Gets the voting phase duration in seconds.
      Returns:
      voting duration, must be positive
    • getSparkSecondaryAbility

      @Nullable public @Nullable String getSparkSecondaryAbility()
      Gets the Spark secondary ability setting.
      Returns:
      spark ability setting ("random", "hunter_vision", "spark_swap", "delusion")
    • getMedicSecondaryAbility

      @Nullable public @Nullable String getMedicSecondaryAbility()
      Gets the Medic secondary ability setting.
      Returns:
      medic ability setting ("random", "healing_sight") or null if unset
    • isRandomSkinsEnabled

      public boolean isRandomSkinsEnabled()
      Gets whether random skins are enabled.
      Returns:
      true if random skins are enabled
    • isUseSteveSkins

      public boolean isUseSteveSkins()
      Gets whether Steve skins are forced.
      Returns:
      true if Steve skins are forced