Record Class AnvilModifier
java.lang.Object
java.lang.Record
xericker.arenalegends.gameplay.anvilstat.AnvilModifier
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAnvilModifier(String id, org.bukkit.attribute.Attribute attribute, org.bukkit.attribute.AttributeModifier.Operation operation, double value) Creates an instance of aAnvilModifierrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(org.bukkit.entity.LivingEntity livingEntity, org.bukkit.attribute.Attribute attribute, org.bukkit.attribute.AttributeModifier.Operation operation, double value) voidadd(org.bukkit.entity.Player player) org.bukkit.attribute.AttributeReturns 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.id()Returns the value of theidrecord component.org.bukkit.attribute.AttributeModifier.OperationReturns the value of theoperationrecord component.final StringtoString()Returns a string representation of this record class.doublevalue()Returns the value of thevaluerecord component.
-
Field Details
-
KEY_PREFIX
-
-
Constructor Details
-
AnvilModifier
public AnvilModifier(String id, org.bukkit.attribute.Attribute attribute, org.bukkit.attribute.AttributeModifier.Operation operation, double value) Creates an instance of aAnvilModifierrecord class.- Parameters:
id- the value for theidrecord componentattribute- the value for theattributerecord componentoperation- the value for theoperationrecord componentvalue- the value for thevaluerecord component
-
-
Method Details
-
add
public void add(org.bukkit.entity.Player player) -
add
public void add(org.bukkit.entity.LivingEntity livingEntity, org.bukkit.attribute.Attribute attribute, org.bukkit.attribute.AttributeModifier.Operation operation, double value) -
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. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
attribute
public org.bukkit.attribute.Attribute attribute()Returns the value of theattributerecord component.- Returns:
- the value of the
attributerecord component
-
operation
public org.bukkit.attribute.AttributeModifier.Operation operation()Returns the value of theoperationrecord component.- Returns:
- the value of the
operationrecord component
-
value
public double value()Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-