Class AttributeModifier

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

public class AttributeModifier extends Object
Represents a modifier applied to an attribute's base value.
  • Constructor Summary

    Constructors
    Constructor
    Description
    AttributeModifier(net.kyori.adventure.key.Key key, double amount, org.bukkit.attribute.AttributeModifier.Operation operation)
    Constructs a new attribute modifier.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Retrieves the raw numeric value associated with this modifier.
    net.kyori.adventure.key.Key
    Retrieves the unique identifier of this modifier.
    org.bukkit.attribute.AttributeModifier.Operation
    Retrieves the specific arithmetic operation performed by this modifier.

    Methods inherited from class Object

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

    • AttributeModifier

      public AttributeModifier(net.kyori.adventure.key.Key key, double amount, org.bukkit.attribute.AttributeModifier.Operation operation)
      Constructs a new attribute modifier.
      Parameters:
      key - The unique key identifying this modifier.
      amount - The numeric value to apply.
      operation - The AttributeModifier.Operation defining how the value interacts with the base.
  • Method Details

    • getKey

      public net.kyori.adventure.key.Key getKey()
      Retrieves the unique identifier of this modifier.
      Returns:
      The modifier key.
    • getAmount

      public double getAmount()
      Retrieves the raw numeric value associated with this modifier.
      Returns:
      The modifier amount.
    • getOperation

      public org.bukkit.attribute.AttributeModifier.Operation getOperation()
      Retrieves the specific arithmetic operation performed by this modifier.
      Returns:
      The AttributeModifier.Operation representing the calculation type.