Interface Upgrade
public interface Upgrade
Represents a type of upgrade that holds all possible levels to which one may upgrade to
- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic enumRepresents the current upgrade state of a player
- 
Method SummaryModifier and TypeMethodDescriptiongetId()The id used in the config for this upgrade@Nullable UpgradeLevelgetLevel(int level) Gets the upgrade levels at a certain levelReturns all UpgradeLevels attached to this upgradeReturns the maximum level in this upgradeReturns the first level of this upgrade@Nullable ArenaConditionGroupThe ArenaConditionGroup that controls what arenas this Upgrade is visible in.Returns the current state of a player that indicates whether he is able to upgrade at this given moment.booleanisApplicable(Arena arena) Get whether this upgrade can even be applied to the given arenabooleanWeather or not this upgrade auto-scales its pricing.booleanWeather or not this upgrade is repeatable.voidsetRestriction(@Nullable ArenaConditionGroup restriction) Lets you restrict this Upgrade, so only be available in certain arenas
- 
Method Details- 
getIdString getId()The id used in the config for this upgrade- Returns:
- the upgrade's id
 
- 
isRepeatableboolean isRepeatable()Weather or not this upgrade is repeatable. Repeatable upgrades typically only have one upgrade level that can be purchased repeatedly- Returns:
- whether the upgrade is repeatable
 
- 
isPriceAutoScalingboolean isPriceAutoScaling()Weather or not this upgrade auto-scales its pricing. Price auto scaling only works if an upgrade is also a repeatable upgrade.- Returns:
- whetherthe upgrade's price auto scales
 
- 
getRestrictionThe ArenaConditionGroup that controls what arenas this Upgrade is visible in.- Returns:
- The condition that states the arenas this Upgrade will be available in. nullif the Upgrade should be displayed in every arena.
 
- 
setRestrictionLets you restrict this Upgrade, so only be available in certain arenas- Parameters:
- restriction- The condition that states the arenas this Upgrade will be available in.- nullif the Upgrade should be displayed in every arena.
 
- 
isApplicableGet whether this upgrade can even be applied to the given arenaOnly case where it's not applicable is if getRestriction()is notnulland the arena does not match the condition- Parameters:
- arena- the arena to check
- Returns:
- trueif the upgrade can be applied to the arena,- falseotherwise
 
- 
getLevelGets the upgrade levels at a certain level- Parameters:
- level- what level you are trying to get
- Returns:
- Gets the upgrade level
 
- 
getLevelsList<UpgradeLevel> getLevels()Returns all UpgradeLevels attached to this upgrade- Returns:
- returns all UpgradeLevels for this upgrade
 
- 
getMinLevelUpgradeLevel getMinLevel()Returns the first level of this upgrade- Returns:
- the first level of this upgrade
 
- 
getMaxLevelUpgradeLevel getMaxLevel()Returns the maximum level in this upgrade- Returns:
- the maximum level of this upgrade
 
- 
getStateReturns the current state of a player that indicates whether he is able to upgrade at this given moment.- Parameters:
- player- The player looking to buy the upgrade
- arena- The arena the player is trying to buy the upgrade in
- team- The team the player is trying to buy the upgrade for
- Returns:
- The state for this specific case
 
 
-