Class AttributeModifier

java.lang.Object
net.minestom.server.attribute.AttributeModifier

public class AttributeModifier extends Object
Represent an attribute modifier.
  • Constructor Details

    • AttributeModifier

      public AttributeModifier(@NotNull @NotNull String name, double amount, @NotNull @NotNull AttributeOperation operation)
      Creates a new modifier with a random id.
      Parameters:
      name - the name of this modifier
      amount - the value of this modifier
      operation - the operation to apply this modifier with
    • AttributeModifier

      public AttributeModifier(@NotNull @NotNull UUID id, @NotNull @NotNull String name, double amount, @NotNull @NotNull AttributeOperation operation)
      Creates a new modifier.
      Parameters:
      id - the id of this modifier
      name - the name of this modifier
      amount - the value of this modifier
      operation - the operation to apply this modifier with
  • Method Details

    • getId

      @NotNull public @NotNull UUID getId()
      Gets the id of this modifier.
      Returns:
      the id of this modifier
    • getName

      @NotNull public @NotNull String getName()
      Gets the name of this modifier.
      Returns:
      the name of this modifier
    • getAmount

      public double getAmount()
      Gets the value of this modifier.
      Returns:
      the value of this modifier
    • getOperation

      @NotNull public @NotNull AttributeOperation getOperation()
      Gets the operation of this modifier.
      Returns:
      the operation of this modifier