Package net.minecraft.server.network
Record Class CommonListenerCookie
java.lang.Object
java.lang.Record
net.minecraft.server.network.CommonListenerCookie
public record CommonListenerCookie(com.mojang.authlib.GameProfile gameProfile, int latency, ClientInformation clientInformation)
extends Record
-
Field Summary
Modifier and TypeFieldDescriptionprivate final ClientInformation
The field for theclientInformation
record component.private final com.mojang.authlib.GameProfile
The field for thegameProfile
record component.private final int
The field for thelatency
record component. -
Constructor Summary
ConstructorDescriptionCommonListenerCookie
(com.mojang.authlib.GameProfile gameProfile, int latency, ClientInformation clientInformation) Creates an instance of aCommonListenerCookie
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theclientInformation
record component.static CommonListenerCookie
createInitial
(com.mojang.authlib.GameProfile p_297256_) final boolean
Indicates whether some other object is "equal to" this one.com.mojang.authlib.GameProfile
Returns the value of thegameProfile
record component.final int
hashCode()
Returns a hash code value for this object.int
latency()
Returns the value of thelatency
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
gameProfile
private final com.mojang.authlib.GameProfile gameProfileThe field for thegameProfile
record component. -
latency
private final int latencyThe field for thelatency
record component. -
clientInformation
The field for theclientInformation
record component.
-
-
Constructor Details
-
CommonListenerCookie
public CommonListenerCookie(com.mojang.authlib.GameProfile gameProfile, int latency, ClientInformation clientInformation) Creates an instance of aCommonListenerCookie
record class.- Parameters:
gameProfile
- the value for thegameProfile
record componentlatency
- the value for thelatency
record componentclientInformation
- the value for theclientInformation
record component
-
-
Method Details
-
createInitial
-
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 '=='. -
gameProfile
public com.mojang.authlib.GameProfile gameProfile()Returns the value of thegameProfile
record component.- Returns:
- the value of the
gameProfile
record component
-
latency
public int latency()Returns the value of thelatency
record component.- Returns:
- the value of the
latency
record component
-
clientInformation
Returns the value of theclientInformation
record component.- Returns:
- the value of the
clientInformation
record component
-