Class CustomAbility.CustomAbilityBuilder
java.lang.Object
dev.aurelium.auraskills.api.ability.CustomAbility.CustomAbilityBuilder
- Enclosing class:
- CustomAbility
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbaseValue
(double baseValue) Sets the default base value of the ability.build()
Builds theCustomAbility
.description
(String description) Sets the default description of the ability.displayName
(String displayName) Sets the default display name of the ability.hasSecondaryValue
(boolean hasSecondaryValue) Sets whether the ability has a secondary value.Sets the default info text of the ability.levelUp
(int levelUp) Sets the default level up interval of the ability.maxLevel
(int maxLevel) Sets the default max level of the ability.unlock
(int unlock) Sets the default unlock level of the ability.valuePerLevel
(double valuePerLevel) Sets the default value per level of the ability.
-
Constructor Details
-
CustomAbilityBuilder
-
-
Method Details
-
baseValue
Sets the default base value of the ability. This is not required if the content directory contains an abilities.yml that defines a base_value already.- Parameters:
baseValue
- the default base value- Returns:
- the builder
-
valuePerLevel
Sets the default value per level of the ability. This is not required if the content directory contains an abilities.yml that defines a value_per_level already.- Parameters:
valuePerLevel
- the default value per level- Returns:
- the builder
-
unlock
Sets the default unlock level of the ability. This is not required if the content directory contains an abilities.yml that defines an unlock already.- Parameters:
unlock
- the default unlock level- Returns:
- the builder
-
levelUp
Sets the default level up interval of the ability. This is not required if the content directory contains an abilities.yml that defines a level_up already.- Parameters:
levelUp
- the default level up interval- Returns:
- the builder
-
maxLevel
Sets the default max level of the ability. This is not required if the content directory contains an abilities.yml that defines a max_level already.- Parameters:
maxLevel
- the default max level- Returns:
- the builder
-
hasSecondaryValue
Sets whether the ability has a secondary value. This is required for the plugin to load secondary values from abilities.yml.- Parameters:
hasSecondaryValue
- whether the ability has a secondary value- Returns:
- the builder
-
displayName
Sets the default display name of the ability.- Parameters:
displayName
- the default display name- Returns:
- the builder
-
description
Sets the default description of the ability. This should include the {value} placeholder for the ability value. If the abilityCustomAbility.hasSecondaryValue()
, the {value_2} placeholder should be included as well.- Parameters:
description
- the default description- Returns:
- the builder
-
info
Sets the default info text of the ability. This should include the {value} placeholder for the ability value. If the abilityCustomAbility.hasSecondaryValue()
, the {value_2} placeholder should be included as well.- Parameters:
info
- the default info text- Returns:
- the builder
-
build
Builds theCustomAbility
. The ability still must be registered usingNamespacedRegistry.registerAbility(CustomAbility)
.- Returns:
- the
CustomAbility
-