Class AttributeModifier
java.lang.Object
com.github.darksoulq.abyssallib.world.data.attribute.AttributeModifier
Represents a modifier applied to an attribute's base value.
-
Constructor Summary
ConstructorsConstructorDescriptionAttributeModifier(net.kyori.adventure.key.Key key, double amount, org.bukkit.attribute.AttributeModifier.Operation operation) Constructs a new attribute modifier. -
Method Summary
Modifier and TypeMethodDescriptiondoubleRetrieves the raw numeric value associated with this modifier.net.kyori.adventure.key.KeygetKey()Retrieves the unique identifier of this modifier.org.bukkit.attribute.AttributeModifier.OperationRetrieves the specific arithmetic operation performed by this modifier.
-
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- TheAttributeModifier.Operationdefining 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.Operationrepresenting the calculation type.
-