Package me.qscbm.inlayx.gem
Record Class Gem.AttributeEntry
java.lang.Object
java.lang.Record
me.qscbm.inlayx.gem.Gem.AttributeEntry
- Enclosing class:
Gem
public static record Gem.AttributeEntry(org.bukkit.attribute.Attribute attribute, double amount, org.bukkit.attribute.AttributeModifier.Operation operation, org.bukkit.inventory.EquipmentSlot slot)
extends Record
一个原版属性修饰符的配置值
-
Constructor Summary
ConstructorsConstructorDescriptionAttributeEntry(org.bukkit.attribute.Attribute attribute, double amount, org.bukkit.attribute.AttributeModifier.Operation operation, org.bukkit.inventory.EquipmentSlot slot) Creates an instance of aAttributeEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleamount()Returns the value of theamountrecord component.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.org.bukkit.attribute.AttributeModifier.OperationReturns the value of theoperationrecord component.org.bukkit.inventory.EquipmentSlotslot()Returns the value of theslotrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AttributeEntry
public AttributeEntry(org.bukkit.attribute.Attribute attribute, double amount, org.bukkit.attribute.AttributeModifier.Operation operation, org.bukkit.inventory.EquipmentSlot slot) Creates an instance of aAttributeEntryrecord class.- Parameters:
attribute- the value for theattributerecord componentamount- the value for theamountrecord componentoperation- the value for theoperationrecord componentslot- the value for theslotrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
attribute
public org.bukkit.attribute.Attribute attribute()Returns the value of theattributerecord component.- Returns:
- the value of the
attributerecord 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
-
slot
public org.bukkit.inventory.EquipmentSlot slot()Returns the value of theslotrecord component.- Returns:
- the value of the
slotrecord component
-