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 Type
    Method
    Description
    Gets the block type that triggers player death/elimination.
    Gets the unique identifier of this game module.
    int
    Gets the maximum number of players allowed in this game.
    int
    Gets the minimum number of players required to start this game.
    int
    Gets the default time limit for this game.
    boolean
    Deprecated.
    Since 3.2.
    boolean
    Checks if this game requires a finish line to be configured.
    boolean
    Checks if this game requires floor regions to be configured.
    boolean
    Deprecated.
    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 boolean requiresBounds()
      Deprecated.
      Since 3.2. Use GameModule.getDisabledRequirements() with SetupRequirement.BOUNDS instead. 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 boolean requiresSpawns()
      Deprecated.
      Since 3.2. Use GameModule.getDisabledRequirements() with SetupRequirement.SPAWNS instead. 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