Record Class AttributeEffect
java.lang.Object
java.lang.Record
net.minestom.server.item.enchant.AttributeEffect
- All Implemented Interfaces:
Enchantment.Effect, LocationEffect
public record AttributeEffect(Key id, Attribute attribute, LevelBasedValue amount, AttributeOperation operation)
extends Record
implements Enchantment.Effect, LocationEffect
-
Nested Class Summary
Nested classes/interfaces inherited from interface LocationEffect
LocationEffect.AllOf -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAttributeEffect(Key id, Attribute attribute, LevelBasedValue amount, AttributeOperation operation) Creates an instance of aAttributeEffectrecord class. -
Method Summary
Modifier and TypeMethodDescriptionamount()Returns the value of theamountrecord component.Returns the value of theattributerecord component.codec()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.Returns the value of theoperationrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
-
Constructor Details
-
AttributeEffect
public AttributeEffect(Key id, Attribute attribute, LevelBasedValue amount, AttributeOperation operation) Creates an instance of aAttributeEffectrecord class.- Parameters:
id- the value for theidrecord componentattribute- the value for theattributerecord componentamount- the value for theamountrecord componentoperation- the value for theoperationrecord component
-
-
Method Details
-
codec
- Specified by:
codecin interfaceLocationEffect
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
attribute
Returns the value of theattributerecord component.- Returns:
- the value of the
attributerecord component
-
amount
Returns the value of theamountrecord component.- Returns:
- the value of the
amountrecord component
-
operation
Returns the value of theoperationrecord component.- Returns:
- the value of the
operationrecord component
-