Interface GenTierState


public interface GenTierState
Represents the current state of the gen tier system in an arena.
  • 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.

      Doesn't go below Duration.ZERO. Might stay at zero for a very short time (max a few seconds) if the server is lagging and the scheduler didn't catch up yet.

      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
    • scheduleNextTier

      void scheduleNextTier(GenTierLevel level, Duration time)
      Schedule the next gen tier level to be reached.
      Parameters:
      level - the next gen tier level to be reached
      time - the duration until the next gen tier level is reached
    • cancelTiers

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