Package net.blueva.arcade.api.game
Interface GameConfig<M>
- Type Parameters:
M- the material/block type (platform-specific)
public interface GameConfig<M>
Represents the configuration for a game module.
This interface provides access to core game settings including player limits, time constraints, death mechanics, and required arena components. Implementations define game-specific requirements that must be met for the arena to be playable.
-
Method Summary
Modifier and TypeMethodDescriptionGets the block type that triggers player death/elimination.Gets the unique identifier of this game module.intGets the maximum number of players allowed in this game.intGets the minimum number of players required to start this game.intgetTime()Gets the default time limit for this game.booleanDeprecated.Since 3.2.booleanChecks if this game requires a finish line to be configured.booleanChecks if this game requires floor regions to be configured.booleanDeprecated.Since 3.2.
-
Method Details
-
getGameId
String getGameId()Gets the unique identifier of this game module.- Returns:
- the game module ID
-
getTime
int getTime()Gets the default time limit for this game.The meaning and units may vary by game (e.g., seconds, ticks).
- Returns:
- the default time value
-
getMinPlayers
int getMinPlayers()Gets the minimum number of players required to start this game.- Returns:
- the minimum player count
-
getMaxPlayers
int getMaxPlayers()Gets the maximum number of players allowed in this game.- Returns:
- the maximum player count
-
getDeathBlock
M getDeathBlock()Gets the block type that triggers player death/elimination.This is commonly used for void blocks, lava, or other hazards.
- Returns:
- the death block material, or null if not applicable
-
requiresBounds
Deprecated.Since 3.2. UseGameModule.getDisabledRequirements()withSetupRequirement.BOUNDSinstead. This method is still consulted by the core when the module does not use the new requirements API.Checks if this game requires arena boundaries to be configured.- Returns:
- true if bounds configuration is required, false otherwise
-
requiresSpawns
Deprecated.Since 3.2. UseGameModule.getDisabledRequirements()withSetupRequirement.SPAWNSinstead. This method is still consulted by the core when the module does not use the new requirements API.Checks if this game requires spawn points to be configured.- Returns:
- true if spawns configuration is required, false otherwise
-
requiresFinishLine
boolean requiresFinishLine()Checks if this game requires a finish line to be configured.This is typically used for race-type games.
- Returns:
- true if finish line configuration is required, false otherwise
-
requiresFloors
boolean requiresFloors()Checks if this game requires floor regions to be configured.This is typically used for games like Block Party or TNT Run.
- Returns:
- true if floors configuration is required, false otherwise
-