Record Class PlayerInfo
java.lang.Object
java.lang.Record
org.cloudburstmc.netty.util.nethernet.PlayerInfo
- Record Components:
xuid- The Xbox user ID of the playerdisplayName- The Xbox gamertag of the playernetworkId- The Network ID the player is joining withremoteAddress- The address the join request came fromclaims- The full set of validated JWT claims, for anything not surfaced above
public record PlayerInfo(String xuid, String displayName, String networkId, InetSocketAddress remoteAddress, org.jose4j.jwt.JwtClaims claims)
extends Record
The validated identity of a player attempting to join.
-
Constructor Summary
ConstructorsConstructorDescriptionPlayerInfo(String xuid, String displayName, String networkId, InetSocketAddress remoteAddress, org.jose4j.jwt.JwtClaims claims) Creates an instance of aPlayerInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionorg.jose4j.jwt.JwtClaimsclaims()Returns the value of theclaimsrecord component.Returns the value of thedisplayNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thenetworkIdrecord component.Returns the value of theremoteAddressrecord component.final StringtoString()Returns a string representation of this record class.xuid()Returns the value of thexuidrecord component.
-
Constructor Details
-
PlayerInfo
public PlayerInfo(String xuid, String displayName, String networkId, InetSocketAddress remoteAddress, org.jose4j.jwt.JwtClaims claims) Creates an instance of aPlayerInforecord class.- Parameters:
xuid- the value for thexuidrecord componentdisplayName- the value for thedisplayNamerecord componentnetworkId- the value for thenetworkIdrecord componentremoteAddress- the value for theremoteAddressrecord componentclaims- the value for theclaimsrecord 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). -
xuid
Returns the value of thexuidrecord component.- Returns:
- the value of the
xuidrecord component
-
displayName
Returns the value of thedisplayNamerecord component.- Returns:
- the value of the
displayNamerecord component
-
networkId
Returns the value of thenetworkIdrecord component.- Returns:
- the value of the
networkIdrecord component
-
remoteAddress
Returns the value of theremoteAddressrecord component.- Returns:
- the value of the
remoteAddressrecord component
-
claims
public org.jose4j.jwt.JwtClaims claims()Returns the value of theclaimsrecord component.- Returns:
- the value of the
claimsrecord component
-