Interface GenTierState
public interface GenTierState
Represents the current state of the gen tier system in an arena.
-
Method Summary
Modifier and TypeMethodDescriptionvoidCancel the current gen tier progression and stops any further.getArena()Get the arena this GenTierState belongs to.@Nullable GenTierLevelGet the tier level that already has been reached.@Nullable GenTierLevelGet the next gen tier level that will be reached.@Nullable DurationGet the remaining time until the next gen tier level is reached.booleanhasBoughtDragon(Team team) Check whether a team has bought a team has bought the sudden-death upgrade.booleanisValid()Check if the gen tier system is currently active in this arena.voidscheduleNextTier(GenTierLevel level) Schedule the next gen tier level to be reached.voidsetDragonBought(Team team, boolean state) Set whether a team has bought the sudden-death upgrade.voidsetRemainingNextTier(Duration duration) 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:
trueif the gen tier system is active,falseotherwise.
-
hasBoughtDragon
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:
trueif the team has bought the sudden-death upgrade,falseotherwise.
-
setDragonBought
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
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
nullif there is no next gen tier level.
-
setRemainingNextTier
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
Get the tier level that already has been reached.- Returns:
- the current gen tier level, or
nullif no gen tier level has been reached yet
-
getNextTier
Get the next gen tier level that will be reached.- Returns:
- the next gen tier level, or
nullif there is no next gen tier level
-
scheduleNextTier
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.
-