Class Attribute

java.lang.Object
com.github.darksoulq.abyssallib.world.data.attribute.Attribute

public final class Attribute extends Object
Represents a definition for a custom numeric attribute. Attributes define a base system for calculating dynamic entity stats.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Attribute(net.kyori.adventure.key.Key key, double defaultValue)
    Constructs a new attribute definition.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Returns the default base value of this attribute.
    net.kyori.adventure.key.Key
    key()
    Returns the unique key used to identify this attribute.

    Methods inherited from class Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Attribute

      public Attribute(net.kyori.adventure.key.Key key, double defaultValue)
      Constructs a new attribute definition.
      Parameters:
      key - The unique key for this attribute.
      defaultValue - The fallback base value when not explicitly set.
  • Method Details

    • key

      public net.kyori.adventure.key.Key key()
      Returns the unique key used to identify this attribute.
      Returns:
      The attribute key.
    • defaultValue

      public double defaultValue()
      Returns the default base value of this attribute.
      Returns:
      The default value.