Record Class MinecraftAccount
java.lang.Object
java.lang.Record
com.soulfiremc.server.account.MinecraftAccount
- Record Components:
authType- The type of authenticationprofileId- Identifier that uniquely identifies the accountlastKnownName- The last known name of the accountaccountData- The data of the account (values depend on the authType)
public record MinecraftAccount(@NonNull AuthType authType, @NonNull UUID profileId, @NonNull String lastKnownName, @NonNull AccountData accountData)
extends Record
Represents an authenticated MC account. This can be a premium, offline or bedrock account. Beware
that the profileId is not a valid online UUID for offline and bedrock accounts.
-
Constructor Summary
ConstructorsConstructorDescriptionMinecraftAccount(@NonNull AuthType authType, @NonNull UUID profileId, @NonNull String lastKnownName, @NonNull AccountData accountData) Creates an instance of aMinecraftAccountrecord class. -
Method Summary
Modifier and TypeMethodDescription@NonNull AccountDataReturns the value of theaccountDatarecord component.@NonNull AuthTypeauthType()Returns the value of theauthTyperecord component.final booleanIndicates whether some other object is "equal to" this one.static MinecraftAccountstatic MinecraftAccountfromProto(MinecraftAccountProto account) final inthashCode()Returns a hash code value for this object.booleanboolean@NonNull StringReturns the value of thelastKnownNamerecord component.@NonNull UUIDReturns the value of theprofileIdrecord component.toProto()toString()Returns a string representation of this record class.
-
Constructor Details
-
MinecraftAccount
public MinecraftAccount(@NonNull @NonNull AuthType authType, @NonNull @NonNull UUID profileId, @NonNull @NonNull String lastKnownName, @NonNull @NonNull AccountData accountData) Creates an instance of aMinecraftAccountrecord class.- Parameters:
authType- the value for theauthTyperecord componentprofileId- the value for theprofileIdrecord componentlastKnownName- the value for thelastKnownNamerecord componentaccountData- the value for theaccountDatarecord component
-
-
Method Details
-
fromProto
-
forProxyCheck
-
toString
-
isPremiumJava
public boolean isPremiumJava() -
isPremiumBedrock
public boolean isPremiumBedrock() -
toProto
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
authType
-
profileId
-
lastKnownName
Returns the value of thelastKnownNamerecord component.- Returns:
- the value of the
lastKnownNamerecord component
-
accountData
Returns the value of theaccountDatarecord component.- Returns:
- the value of the
accountDatarecord component
-