Class CustomAbility.CustomAbilityBuilder

java.lang.Object
dev.aurelium.auraskills.api.ability.CustomAbility.CustomAbilityBuilder
Enclosing class:
CustomAbility

public static class CustomAbility.CustomAbilityBuilder extends Object
  • Constructor Details

    • CustomAbilityBuilder

      public CustomAbilityBuilder(NamespacedId id)
  • Method Details

    • baseValue

      public CustomAbility.CustomAbilityBuilder baseValue(double 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

      public CustomAbility.CustomAbilityBuilder valuePerLevel(double 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

      public CustomAbility.CustomAbilityBuilder unlock(int 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

      public CustomAbility.CustomAbilityBuilder levelUp(int 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

      public CustomAbility.CustomAbilityBuilder maxLevel(int 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

      public CustomAbility.CustomAbilityBuilder hasSecondaryValue(boolean 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

      public CustomAbility.CustomAbilityBuilder displayName(String displayName)
      Sets the default display name of the ability.
      Parameters:
      displayName - the default display name
      Returns:
      the builder
    • description

      public CustomAbility.CustomAbilityBuilder description(String description)
      Sets the default description of the ability. This should include the {value} placeholder for the ability value. If the ability CustomAbility.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 ability CustomAbility.hasSecondaryValue(), the {value_2} placeholder should be included as well.
      Parameters:
      info - the default info text
      Returns:
      the builder
    • build

      public CustomAbility build()
      Builds the CustomAbility. The ability still must be registered using NamespacedRegistry.registerAbility(CustomAbility).
      Returns:
      the CustomAbility