Interface GenTierState


public interface GenTierState
Represents the current state of the gen tier system in an arena.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Cancel the current gen tier progression and stops any further.
    Get the arena this GenTierState belongs to.
    @Nullable GenTierLevel
    Get the tier level that already has been reached.
    @Nullable GenTierLevel
    Get the next gen tier level that will be reached.
    @Nullable Duration
    Get the remaining time until the next gen tier level is reached.
    boolean
    Check whether a team has bought a team has bought the sudden-death upgrade.
    boolean
    Check if the gen tier system is currently active in this arena.
    void
    Schedule the next gen tier level to be reached.
    void
    setDragonBought(Team team, boolean state)
    Set whether a team has bought the sudden-death upgrade.
    void
    Set the remaining time until the next gen tier level is reached.
  • Method Details

    • getArena

      Arena getArena()
      Get the arena this GenTierState belongs to.
      Returns:
      The arena this GenTierState belongs to.
    • isValid

      boolean isValid()
      Check if the gen tier system is currently active in this arena.
      Returns:
      true if the gen tier system is active, false otherwise.
    • hasBoughtDragon

      boolean hasBoughtDragon(Team team)
      Check whether a team has bought a team has bought the sudden-death upgrade.

      As a result, a dragon will be spawned for the team on sudden death.

      Parameters:
      team - The team to check.
      Returns:
      true if the team has bought the sudden-death upgrade, false otherwise.
    • setDragonBought

      void setDragonBought(Team team, boolean state)
      Set whether a team has bought the sudden-death upgrade.

      As a result, a dragon will be spawned for the team on sudden death.

      Parameters:
      team - The team to set.
      state - The state to set.
    • getRemainingNextTier

      @Nullable @Nullable Duration getRemainingNextTier()
      Get the remaining time until the next gen tier level is reached.
      Returns:
      The remaining time until the next gen tier level is reached, or null if there is no next gen tier level.
    • setRemainingNextTier

      void setRemainingNextTier(Duration duration)
      Set the remaining time until the next gen tier level is reached.
      Parameters:
      duration - The duration to set
      Throws:
      IllegalStateException - if there is no next gen tier level
    • getCurrentTier

      @Nullable @Nullable GenTierLevel getCurrentTier()
      Get the tier level that already has been reached.
      Returns:
      the current gen tier level, or null if no gen tier level has been reached yet
    • getNextTier

      @Nullable @Nullable GenTierLevel getNextTier()
      Get the next gen tier level that will be reached.
      Returns:
      the next gen tier level, or null if there is no next gen tier level
    • scheduleNextTier

      void scheduleNextTier(GenTierLevel level)
      Schedule the next gen tier level to be reached.
      Parameters:
      level - the next gen tier level to be reached
    • cancelTiers

      void cancelTiers()
      Cancel the current gen tier progression and stops any further.