Record Class ServerLink
java.lang.Object
java.lang.Record
org.geysermc.mcprotocollib.protocol.data.game.ServerLink
public record ServerLink(@Nullable ServerLinkType knownType, @Nullable net.kyori.adventure.text.Component unknownType, String link)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionServerLink(@Nullable ServerLinkType knownType, @Nullable net.kyori.adventure.text.Component unknownType, String link) Creates an instance of aServerLinkrecord class. -
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.@Nullable ServerLinkTypeReturns the value of theknownTyperecord component.link()Returns the value of thelinkrecord component.final StringtoString()Returns a string representation of this record class.@Nullable net.kyori.adventure.text.ComponentReturns the value of theunknownTyperecord component.
-
Constructor Details
-
ServerLink
public ServerLink(@Nullable @Nullable ServerLinkType knownType, @Nullable @Nullable net.kyori.adventure.text.Component unknownType, String link) Creates an instance of aServerLinkrecord class.- Parameters:
knownType- the value for theknownTyperecord componentunknownType- the value for theunknownTyperecord componentlink- the value for thelinkrecord 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. 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
-
unknownType
@Nullable public @Nullable net.kyori.adventure.text.Component unknownType()Returns the value of theunknownTyperecord component.- Returns:
- the value of the
unknownTyperecord component
-
link
Returns the value of thelinkrecord component.- Returns:
- the value of the
linkrecord component
-