Record Class PlayerProfile
java.lang.Object
java.lang.Record
lol.trq.alts.account.PlayerProfile
- Record Components:
uuid- the account UUID (undashed, as the endpoint returns it)name- the current usernameskins- the skins on the account, at most oneSkin.State.ACTIVEcapes- the capes the account owns, at most oneCape.State.ACTIVEprofileActions- pending moderation actions (empty for an account in good standing)
public record PlayerProfile(String uuid, String name, List<Skin> skins, List<Cape> capes, List<String> profileActions)
extends Record
A player's full Minecraft profile as
GET /minecraft/profile returns it — not just the name and
UUID an authentication flow needs, but the skins, capes, and any pending moderation actions on the
account.
Distinct from the identity a sign-in resolves, which reaches a host as the account on its
LoginResult. This is the read a host performs on a live account to show what it
looks like and owns.
- Since:
- 0.11.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the active cape, if the account has one shown.Returns the active skin, if the account has one.capes()Returns the value of thecapesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns whether the account carries any pending moderation action, which a host may want to warn about before relying on the account.name()Returns the value of thenamerecord component.Returns the value of theprofileActionsrecord component.skins()Returns the value of theskinsrecord component.final StringtoString()Returns a string representation of this record class.uuid()Returns the value of theuuidrecord component.
-
Constructor Details
-
PlayerProfile
-
-
Method Details
-
activeSkin
Returns the active skin, if the account has one.- Returns:
- the active skin, or
nullwhen none is active - Since:
- 0.11.0
-
activeCape
Returns the active cape, if the account has one shown.- Returns:
- the active cape, or
nullwhen none is active - Since:
- 0.11.0
-
hasPendingActions
public boolean hasPendingActions()Returns whether the account carries any pending moderation action, which a host may want to warn about before relying on the account.- Returns:
- true if a profile action is pending
- Since:
- 0.11.0
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
uuid
-
name
-
skins
-
capes
-
profileActions
Returns the value of theprofileActionsrecord component.- Returns:
- the value of the
profileActionsrecord component
-