Package com.ohacd.matchbox.api
Class GameConfig
java.lang.Object
com.ohacd.matchbox.api.GameConfig
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder class for creating GameConfig instances. -
Constructor Summary
ConstructorsConstructorDescriptionGameConfig(int swipeDuration, int discussionDuration, int votingDuration, String sparkSecondaryAbility, String medicSecondaryAbility, boolean randomSkinsEnabled, boolean useSteveSkins) Creates a new game configuration. -
Method Summary
Modifier and TypeMethodDescriptionintGets the discussion phase duration in seconds.@Nullable StringGets the Medic secondary ability setting.@Nullable StringGets the Spark secondary ability setting.intGets the swipe phase duration in seconds.intGets the voting phase duration in seconds.booleanGets whether random skins are enabled.booleanGets whether Steve skins are forced.
-
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 secondsdiscussionDuration- duration of discussion phase in secondsvotingDuration- duration of voting phase in secondssparkSecondaryAbility- Spark's secondary ability settingmedicSecondaryAbility- Medic's secondary ability settingrandomSkinsEnabled- whether to use random skinsuseSteveSkins- 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
Gets the Spark secondary ability setting.- Returns:
- spark ability setting ("random", "hunter_vision", "spark_swap", "delusion")
-
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
-