Enum Class Abilities
- All Implemented Interfaces:
Ability
,AbstractAbility
,Optioned
,NamespaceIdentified
,Serializable
,Comparable<Abilities>
,Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptiondouble
Gets the value of an ability when it is at level 1 (just unlocked).getDescription
(Locale locale) Gets the ability description as defined in the locale's messages file.getDisplayName
(Locale locale) Gets the ability display name as defined in the locale's messages file.getId()
Gets theNamespacedId
of the objectGets the ability info text as defined in the locale's messages file.int
Gets the interval of skill levels between ability level ups.int
Gets the max level of the ability based on the configuration.double
Gets the secondary value of an ability when it is at level 1 (just unlocked).double
getSecondaryValue
(int level) Gets the secondary value of the ability at a specific ability level.double
Gets the amount that the secondary ability value is increased by for every ability level.getSkill()
Gets the skill the ability is leveled up by based on the configuration in the skills.yml file.int
Gets the skill level the ability is unlocked at based on the configuration.double
getValue
(int level) Gets the value of the ability at a specific ability level.double
Gets the amount that the ability value is increased by for every ability level.boolean
Gets whether the ability has a secondary value that varies with the ability levelboolean
Gets whether the ability is enabled in the configuration.boolean
optionBoolean
(String key) boolean
optionBoolean
(String key, boolean def) double
optionDouble
(String key) double
optionDouble
(String key, double def) int
int
optionString
(String key) optionString
(String key, String def) optionStringList
(String key) toString()
static Abilities
Returns the enum constant of this class with the specified name.static Abilities[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
BOUNTIFUL_HARVEST
-
FARMER
-
SCYTHE_MASTER
-
GENETICIST
-
GROWTH_AURA
-
LUMBERJACK
-
FORAGER
-
AXE_MASTER
-
VALOR
-
SHREDDER
-
LUCKY_MINER
-
MINER
-
PICK_MASTER
-
STAMINA
-
HARDENED_ARMOR
-
LUCKY_CATCH
-
FISHER
-
TREASURE_HUNTER
-
GRAPPLER
-
EPIC_CATCH
-
METAL_DETECTOR
-
EXCAVATOR
-
SPADE_MASTER
-
BIGGER_SCOOP
-
LUCKY_SPADES
-
RETRIEVAL
-
ARCHER
-
BOW_MASTER
-
PIERCING
-
STUN
-
SHIELDING
-
DEFENDER
-
MOB_MASTER
-
IMMUNITY
-
NO_DEBUFF
-
PARRY
-
FIGHTER
-
SWORD_MASTER
-
FIRST_STRIKE
-
BLEED
-
ANTI_HUNGER
-
RUNNER
-
GOLDEN_HEAL
-
RECOVERY
-
MEAL_STEAL
-
LIGHT_FALL
-
JUMPER
-
SUGAR_RUSH
-
FLEETING
-
THUNDER_FALL
-
ALCHEMIST
-
BREWER
-
SPLASHER
-
LINGERING
-
WISE_EFFECT
-
XP_CONVERT
-
ENCHANTER
-
XP_WARRIOR
-
ENCHANTED_STRENGTH
-
LUCKY_TABLE
-
SORCERER
-
LIFE_ESSENCE
-
HEALER
-
LIFE_STEAL
-
GOLDEN_HEART
-
REVIVAL
-
DISENCHANTER
-
FORGER
-
REPAIRING
-
ANVIL_MASTER
-
SKILL_MENDER
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
getId
Description copied from interface:NamespaceIdentified
Gets theNamespacedId
of the object- Specified by:
getId
in interfaceNamespaceIdentified
- Returns:
- the
NamespacedId
-
toString
-
getSkill
Description copied from interface:AbstractAbility
Gets the skill the ability is leveled up by based on the configuration in the skills.yml file.- Specified by:
getSkill
in interfaceAbstractAbility
- Returns:
- the skill the ability belongs to
-
getLegacySkillName
-
getDisplayName
Description copied from interface:Ability
Gets the ability display name as defined in the locale's messages file.- Specified by:
getDisplayName
in interfaceAbility
- Parameters:
locale
- the locale to get the display name in- Returns:
- the display name in the specified locale or in a fallback language
-
getDescription
Description copied from interface:Ability
Gets the ability description as defined in the locale's messages file.- Specified by:
getDescription
in interfaceAbility
- Parameters:
locale
- the locale to get the description in- Returns:
- the description in the specified locale or in a fallback language
-
getInfo
Description copied from interface:Ability
Gets the ability info text as defined in the locale's messages file. The info text shows an ability's effects for a given level in a concise way and is shown in the main skills menu. -
hasSecondaryValue
public boolean hasSecondaryValue()Description copied from interface:Ability
Gets whether the ability has a secondary value that varies with the ability level- Specified by:
hasSecondaryValue
in interfaceAbility
- Returns:
- whether the ability has a secondary value
-
isEnabled
public boolean isEnabled()Description copied from interface:Ability
Gets whether the ability is enabled in the configuration. Abilities that are not loaded in any skill will always return false. Disabled abilities should have no effect on gameplay. -
getBaseValue
public double getBaseValue()Description copied from interface:Ability
Gets the value of an ability when it is at level 1 (just unlocked).- Specified by:
getBaseValue
in interfaceAbility
- Returns:
- the base value
-
getSecondaryBaseValue
public double getSecondaryBaseValue()Description copied from interface:Ability
Gets the secondary value of an ability when it is at level 1 (just unlocked). IfAbility.hasSecondaryValue()
returns false, this method will return 0.- Specified by:
getSecondaryBaseValue
in interfaceAbility
- Returns:
- the secondary base value
-
getValue
public double getValue(int level) Description copied from interface:Ability
Gets the value of the ability at a specific ability level. -
getValuePerLevel
public double getValuePerLevel()Description copied from interface:Ability
Gets the amount that the ability value is increased by for every ability level. This value only starts being added from ability level 2. A negative value means the ability value is decreased when leveled up.- Specified by:
getValuePerLevel
in interfaceAbility
- Returns:
- the change in value per ability level
-
getSecondaryValuePerLevel
public double getSecondaryValuePerLevel()Description copied from interface:Ability
Gets the amount that the secondary ability value is increased by for every ability level. This value only starts being added from ability level 2. A negative value means the ability value is decreased when leveled up. IfAbility.hasSecondaryValue()
returns false, this method will return 0.- Specified by:
getSecondaryValuePerLevel
in interfaceAbility
- Returns:
- the change in secondary value per ability level
-
getSecondaryValue
public double getSecondaryValue(int level) Description copied from interface:Ability
Gets the secondary value of the ability at a specific ability level. IfAbility.hasSecondaryValue()
returns false, this method will return 0.- Specified by:
getSecondaryValue
in interfaceAbility
- Parameters:
level
- the ability level- Returns:
- the secondary value at the level
-
getUnlock
public int getUnlock()Description copied from interface:AbstractAbility
Gets the skill level the ability is unlocked at based on the configuration.- Specified by:
getUnlock
in interfaceAbstractAbility
- Returns:
- the skill level the ability is unlocked at
-
getLevelUp
public int getLevelUp()Description copied from interface:AbstractAbility
Gets the interval of skill levels between ability level ups. A value of 5 means the ability levels up every 5 levels, starting at the value ofAbstractAbility.getUnlock()
.- Specified by:
getLevelUp
in interfaceAbstractAbility
- Returns:
- the level up interval
-
getMaxLevel
public int getMaxLevel()Description copied from interface:AbstractAbility
Gets the max level of the ability based on the configuration.- Specified by:
getMaxLevel
in interfaceAbstractAbility
- Returns:
- the max level
-
optionBoolean
- Specified by:
optionBoolean
in interfaceOptioned
-
optionBoolean
- Specified by:
optionBoolean
in interfaceOptioned
-
optionInt
-
optionInt
-
optionDouble
- Specified by:
optionDouble
in interfaceOptioned
-
optionDouble
- Specified by:
optionDouble
in interfaceOptioned
-
optionString
- Specified by:
optionString
in interfaceOptioned
-
optionString
- Specified by:
optionString
in interfaceOptioned
-
optionStringList
- Specified by:
optionStringList
in interfaceOptioned
-
optionMap
-