Record Class OnlineSimpleJavaData
java.lang.Object
java.lang.Record
com.soulfiremc.server.account.service.OnlineSimpleJavaData
- All Implemented Interfaces:
AccountData
public record OnlineSimpleJavaData(String accessToken, long expireTimeMs)
extends Record
implements AccountData
Account data for Java Edition accounts authenticated with a raw Minecraft access token.
Unlike OnlineChainJavaData, this does not store a full authentication chain and cannot
be refreshed. The token is used as-is until it expires.
-
Constructor Summary
ConstructorsConstructorDescriptionOnlineSimpleJavaData(String accessToken, long expireTimeMs) Creates an instance of aOnlineSimpleJavaDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaccessTokenrecord component.final booleanIndicates whether some other object is "equal to" this one.longReturns the value of theexpireTimeMsrecord component.static OnlineSimpleJavaDatafinal inthashCode()Returns a hash code value for this object.toProto()final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
OnlineSimpleJavaData
Creates an instance of aOnlineSimpleJavaDatarecord class.- Parameters:
accessToken- the value for theaccessTokenrecord componentexpireTimeMs- the value for theexpireTimeMsrecord component
-
-
Method Details
-
fromProto
-
toProto
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
accessToken
Returns the value of theaccessTokenrecord component.- Returns:
- the value of the
accessTokenrecord component
-
expireTimeMs
public long expireTimeMs()Returns the value of theexpireTimeMsrecord component.- Returns:
- the value of the
expireTimeMsrecord component
-