@API(status = STABLE)
public final class User
implements MinecraftAccountRepresents a logged-in user
uuid is the unique identifier for the user (Mojang UUID)
username is the display name of the user
accessToken is the token used for authenticated requests
serializedSession is the full session data as returned by the authentication server
- Implemented interfaces
- MinecraftAccount
Constructors
public User(
UUID uuid,
String username,
String accessToken,
JsonObject serializedSession
)Methods
String accessToken()boolean equals(Object)MinecraftUUID getMinecraftUUID()int hashCode()JsonObject serializedSession()String toString()String username()public String accessToken()| Returns | ||
|---|---|---|
String | ||
public boolean equals(Object o)| Parameters | ||
|---|---|---|
o | Object | |
| Returns | ||
boolean | ||
Overrides Object.equals()
public MinecraftUUID getMinecraftUUID()| Returns | ||
|---|---|---|
MinecraftUUID | MinecraftUUID, contains dashed and non dashed uuid | |
Implements MinecraftAccount.getMinecraftUUID()
public int hashCode()| Returns | ||
|---|---|---|
int | ||
Overrides Object.hashCode()
public JsonObject serializedSession()| Returns | ||
|---|---|---|
JsonObject | ||
public String toString()| Returns | ||
|---|---|---|
String | ||
Overrides Object.toString()
public String username()| Returns | ||
|---|---|---|
String | The display name of the account | |
Implements MinecraftAccount.username(), description copied from there
Used by
Methods of other types that accept or return User.