Record Class ServerLinksPacket.Entry
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.common.ServerLinksPacket.Entry
- Enclosing class:
ServerLinksPacket
public static record ServerLinksPacket.Entry(@Nullable ServerLinksPacket.KnownLinkType knownType, @Nullable Component customType, @NotNull String link)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final NetworkBuffer.Type<List<ServerLinksPacket.Entry>> static final NetworkBuffer.Type<ServerLinksPacket.Entry> -
Constructor Summary
ConstructorsConstructorDescriptionEntry(@NotNull ServerLinksPacket.KnownLinkType type, @NotNull String link) Entry(@Nullable ServerLinksPacket.KnownLinkType knownType, @Nullable Component customType, @NotNull String link) Creates an instance of aEntryrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable ComponentReturns the value of thecustomTyperecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable ServerLinksPacket.KnownLinkTypeReturns the value of theknownTyperecord component.@NotNull Stringlink()Returns the value of thelinkrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
NETWORK_TYPE
-
LIST_NETWORK_TYPE
-
-
Constructor Details
-
Entry
public Entry(@Nullable @Nullable ServerLinksPacket.KnownLinkType knownType, @Nullable @Nullable Component customType, @NotNull @NotNull String link) Creates an instance of aEntryrecord class.- Parameters:
knownType- the value for theknownTyperecord componentcustomType- the value for thecustomTyperecord componentlink- the value for thelinkrecord component
-
Entry
-
Entry
-
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
knownType
Returns the value of theknownTyperecord component.- Returns:
- the value of the
knownTyperecord component
-
customType
Returns the value of thecustomTyperecord component.- Returns:
- the value of the
customTyperecord component
-
link
Returns the value of thelinkrecord component.- Returns:
- the value of the
linkrecord component
-