Package konquest.api.model
Enum KonquestUpgrade
- All Implemented Interfaces:
Serializable,Comparable<KonquestUpgrade>,java.lang.constant.Constable
An upgrade for a town.
Upgrades have a cost in favor, and a population requirement.
Upgrades can have multiple levels.
- Author:
- Rumsfield
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionGets the description of this upgrade.org.bukkit.MaterialgetIcon()Gets the material used for menu icons.getLevelDescription(int level) Gets the level description, starting at 1.intGets the maximum levels for this upgrade.static KonquestUpgradegetUpgrade(String name) Get the corresponding KonquestUpgrade enum that matches the given name.static KonquestUpgradeReturns the enum constant of this type with the specified name.static KonquestUpgrade[]values()Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
LOOT
Monument Loot upgrade -
DROPS
Animal Drops upgrade -
FATIGUE
Enemy Fatigue upgrade -
COUNTER
Counter-Intelligence upgrade -
HEALTH
Health Buff upgrade -
DAMAGE
Prevent Damage upgrade -
WATCH
Town Watch upgrade -
ENCHANT
Better Enchantments upgrade
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getMaxLevel
public int getMaxLevel()Gets the maximum levels for this upgrade.- Returns:
- The maximum levels
-
getIcon
public org.bukkit.Material getIcon()Gets the material used for menu icons.- Returns:
- The material
-
getDescription
Gets the description of this upgrade.- Returns:
- The description
-
getLevelDescription
Gets the level description, starting at 1. Level 0 returns empty string. Levels higher than the max level returns an empty string.- Parameters:
level- The level- Returns:
- The level description
-
getUpgrade
Get the corresponding KonquestUpgrade enum that matches the given name. Returns null when the name does not match any enum.- Parameters:
name- The name of the enum- Returns:
- The KonquestUpgrade enum that matches name
-