Record Class AttributeList
java.lang.Object
java.lang.Record
net.minestom.server.item.component.AttributeList
public record AttributeList(@NotNull List<AttributeList.Modifier> modifiers, boolean showInTooltip)
extends Record
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final AttributeListstatic final BinaryTagSerializer<AttributeList> static final NetworkBuffer.Type<AttributeList> -
Constructor Summary
ConstructorsConstructorDescriptionAttributeList(@NotNull List<AttributeList.Modifier> modifiers) AttributeList(@NotNull List<AttributeList.Modifier> modifiers, boolean showInTooltip) Creates an instance of aAttributeListrecord class.AttributeList(@NotNull AttributeList.Modifier modifier) AttributeList(@NotNull AttributeList.Modifier modifier, boolean showInTooltip) -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull List<AttributeList.Modifier> Returns the value of themodifiersrecord component.booleanReturns the value of theshowInTooltiprecord component.final StringtoString()Returns a string representation of this record class.@NotNull AttributeListwith(@NotNull AttributeList.Modifier modifier) @NotNull AttributeListwithTooltip(boolean showInTooltip)
-
Field Details
-
EMPTY
-
NETWORK_TYPE
-
NBT_TYPE
-
-
Constructor Details
-
AttributeList
public AttributeList(@NotNull @NotNull List<AttributeList.Modifier> modifiers, boolean showInTooltip) Creates an instance of aAttributeListrecord class.- Parameters:
modifiers- the value for themodifiersrecord componentshowInTooltip- the value for theshowInTooltiprecord component
-
AttributeList
-
AttributeList
-
AttributeList
-
-
Method Details
-
with
-
withTooltip
-
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 '=='. -
modifiers
Returns the value of themodifiersrecord component.- Returns:
- the value of the
modifiersrecord component
-
showInTooltip
public boolean showInTooltip()Returns the value of theshowInTooltiprecord component.- Returns:
- the value of the
showInTooltiprecord component
-