Interface UpgradeLevel
public interface UpgradeLevel
Represents a specific tier of upgrade to which one may have upgraded to.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanReturns if a player could afford to purchase an UpgradeLevel.doubleReturns the amplifier applied to this upgrade level.intGets the duration (in seconds) of an UpgradeLevel.@Nullable IntegerReturns the slot at which it'll be placed at after the rendering of the upgrade shop layout GUI Can be null if it shouldn't do thatgetIcon()Returns the default icon that's being used upgrade shopintgetLevel()Returns level number of this upgrade levelintgetPriceAmount(Arena arena, Team team) Returns the actual price that a team has to pay for this upgrade.intgetPriceAmount(Player player) Returns the actual price that a player has to pay for this upgrade.Returns the DropType required to purchase the itemintReturns amount of a specific DropType required to purchase this UpgradeLevel@Nullable UpgradeTriggerHandlerReturns UpgradeTriggerHandler used by this UpgradeLevelReturns UpgradeTriggerHandler used by this UpgradeLevelReturns upgrade that this upgrade level belongs tobooleanisTrap()Returns whether this UpgradeLevel is a trap.voidsetAmplifier(double amplifier) Sets the amplifier applied to this upgrade level.voidsetDuration(int duration) Sets the duration (in seconds) of an UpgradeLevel.voidsetForceSlot(@Nullable Integer forceSlot) Define at which it shall be forced at after the rendering of the upgrade shop GUI
 Can be null if it shouldn't do thatvoidReturns the id that's being used in e.g. the shop configvoidsetPriceDropType(DropType dropType) Sets the DropType required to purchase the itemvoidsetRegularPriceAmount(int amount) Sets the amount of a specific DropType required to purchase this UpgradeLevel.voidsetTriggerHandler(UpgradeTriggerHandler handler) Set the UpgradeTriggerHandler used by this UpgradeLevelvoidsetTriggerHandlerId(String handlerId) Set the id of the new UpgradeTriggerHandler used by this UpgradeLevel
- 
Method Details- 
getUpgradeUpgrade getUpgrade()Returns upgrade that this upgrade level belongs to- Returns:
- The upgrade that owns this level
 
- 
getLevelint getLevel()Returns level number of this upgrade level- Returns:
- The level of this item
 
- 
getIconItemStack getIcon()Returns the default icon that's being used upgrade shop- Returns:
- The id of this item
 
- 
setIconReturns the id that's being used in e.g. the shop config- Parameters:
- icon- id of this item
 
- 
getForceSlotReturns the slot at which it'll be placed at after the rendering of the upgrade shop layout GUI Can be null if it shouldn't do that- Returns:
- The slot at which it shall be forced at
 
- 
setForceSlotDefine at which it shall be forced at after the rendering of the upgrade shop GUI
 Can be null if it shouldn't do that- Parameters:
- forceSlot- The new value
 
- 
setPriceDropTypeSets the DropType required to purchase the item- Parameters:
- dropType- the price of this upgrade
 
- 
getPriceDropTypeDropType getPriceDropType()Returns the DropType required to purchase the item- Returns:
- the price of this upgrade
 
- 
setDurationvoid setDuration(int duration) Sets the duration (in seconds) of an UpgradeLevel. Not all upgrade handlers require a duration- Parameters:
- duration- the duration (in seconds) of this UpgradeLevel
 
- 
getDurationint getDuration()Gets the duration (in seconds) of an UpgradeLevel. Not all upgrade handlers require a duration. Returns 0 if this is the case- Returns:
- the duration (in seconds) of this UpgradeLevel
 
- 
setRegularPriceAmountvoid setRegularPriceAmount(int amount) Sets the amount of a specific DropType required to purchase this UpgradeLevel.The actual price may vary by factors such as e.g. Upgrade.isPriceAutoScaling().
 UsegetPriceAmount(Player)orgetPriceAmount(Arena, Team)for a more practical price amount.- Parameters:
- amount- the new price amount of this UpgradeLevel
 
- 
getPriceAmountReturns the actual price that a player has to pay for this upgrade.The actual price may vary by factors such as e.g. Upgrade.isPriceAutoScaling().- Returns:
- the current price amount of this UpgradeLevel
 
- 
getPriceAmountReturns the actual price that a team has to pay for this upgrade.The actual price may vary by factors such as e.g. Upgrade.isPriceAutoScaling().- Returns:
- The current practical price amount of this UpgradeLevel
 
- 
getRegularPriceAmountint getRegularPriceAmount()Returns amount of a specific DropType required to purchase this UpgradeLevel- Returns:
- the current price amount of this UpgradeLevel
 
- 
getAmplifierdouble getAmplifier()Returns the amplifier applied to this upgrade level. Used to determine how powerful an upgrade should be- Returns:
- the amplifier applied to this UpgradeLevel
 
- 
setAmplifiervoid setAmplifier(double amplifier) Sets the amplifier applied to this upgrade level. Used to determine how powerful an upgrade should be- Parameters:
- amplifier- the new amplifier
 
- 
isTrapboolean isTrap()Returns whether this UpgradeLevel is a trap. Will also returnfalseif the handler is null- Returns:
- If this UpgradeLevel is a trap
 
- 
getTriggerHandlerReturns UpgradeTriggerHandler used by this UpgradeLevel- Returns:
- The UpgradeTriggerHandler used by this UpgradeLevel.nullwhen it hasn't been registered yet
 
- 
getTriggerHandlerIdString getTriggerHandlerId()Returns UpgradeTriggerHandler used by this UpgradeLevel- Returns:
- The UpgradeTriggerHandler used by this UpgradeLevel.
 
- 
setTriggerHandlerSet the UpgradeTriggerHandler used by this UpgradeLevel- Parameters:
- handler- The new trigger handler
 
- 
setTriggerHandlerIdSet the id of the new UpgradeTriggerHandler used by this UpgradeLevel- Parameters:
- handlerId- The new trigger handler id
 
- 
canAffordReturns if a player could afford to purchase an UpgradeLevel.- Returns:
- if a player has enough materials to purchase this level
 
 
-