Package com.soulfiremc.server.account
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 aMinecraftAccount
record class. -
Method Summary
Modifier and TypeMethodDescription@NonNull AccountData
Returns the value of theaccountData
record component.@NonNull AuthType
authType()
Returns the value of theauthType
record component.final boolean
Indicates whether some other object is "equal to" this one.static MinecraftAccount
static MinecraftAccount
fromProto
(MinecraftAccountProto account) final int
hashCode()
Returns a hash code value for this object.boolean
boolean
@NonNull String
Returns the value of thelastKnownName
record component.@NonNull UUID
Returns the value of theprofileId
record 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 aMinecraftAccount
record class.- Parameters:
authType
- the value for theauthType
record componentprofileId
- the value for theprofileId
record componentlastKnownName
- the value for thelastKnownName
record componentaccountData
- the value for theaccountData
record component
-
-
Method Details
-
fromProto
-
forProxyCheck
-
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. -
isPremiumJava
public boolean isPremiumJava() -
isPremiumBedrock
public boolean isPremiumBedrock() -
toProto
-
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)
. -
authType
Returns the value of theauthType
record component.- Returns:
- the value of the
authType
record component
-
profileId
Returns the value of theprofileId
record component.- Returns:
- the value of the
profileId
record component
-
lastKnownName
Returns the value of thelastKnownName
record component.- Returns:
- the value of the
lastKnownName
record component
-
accountData
Returns the value of theaccountData
record component.- Returns:
- the value of the
accountData
record component
-