Record Class RelicAttributeModifier
java.lang.Object
java.lang.Record
com.github.darksoulq.relique.component.RelicAttributeModifier
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.github.darksoulq.abyssallib.common.serialization.Codec<RelicAttributeModifier> -
Constructor Summary
ConstructorsConstructorDescriptionRelicAttributeModifier(net.kyori.adventure.key.Key attribute, net.kyori.adventure.key.Key id, double amount, org.bukkit.attribute.AttributeModifier.Operation operation, List<String> slots) Creates an instance of aRelicAttributeModifierrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleamount()Returns the value of theamountrecord component.net.kyori.adventure.key.KeyReturns the value of theattributerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.kyori.adventure.key.Keyid()Returns the value of theidrecord component.org.bukkit.attribute.AttributeModifier.OperationReturns the value of theoperationrecord component.slots()Returns the value of theslotsrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
public static final com.github.darksoulq.abyssallib.common.serialization.Codec<RelicAttributeModifier> CODEC
-
-
Constructor Details
-
RelicAttributeModifier
public RelicAttributeModifier(net.kyori.adventure.key.Key attribute, net.kyori.adventure.key.Key id, double amount, org.bukkit.attribute.AttributeModifier.Operation operation, List<String> slots) Creates an instance of aRelicAttributeModifierrecord class.- Parameters:
attribute- the value for theattributerecord componentid- the value for theidrecord componentamount- the value for theamountrecord componentoperation- the value for theoperationrecord componentslots- the value for theslotsrecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
attribute
public net.kyori.adventure.key.Key attribute()Returns the value of theattributerecord component.- Returns:
- the value of the
attributerecord component
-
id
public net.kyori.adventure.key.Key id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
amount
public double amount()Returns the value of theamountrecord component.- Returns:
- the value of the
amountrecord component
-
operation
public org.bukkit.attribute.AttributeModifier.Operation operation()Returns the value of theoperationrecord component.- Returns:
- the value of the
operationrecord component
-
slots
-