public class SessionService extends Service
| Constructor and Description |
|---|
SessionService()
Creates a new SessionService instance.
|
| Modifier and Type | Method and Description |
|---|---|
GameProfile |
fillProfileProperties(GameProfile profile)
Fills in the properties of a profile.
|
GameProfile |
getProfileByServer(String name,
String serverId)
Gets the profile of the given user if they are currently logged in to the given server.
|
String |
getServerId(String base,
PublicKey publicKey,
SecretKey secretKey)
Calculates the server ID from a base string, public key, and secret key.
|
void |
joinServer(GameProfile profile,
String authenticationToken,
String serverId)
Joins a server.
|
String |
toString() |
getBaseUri, getEndpointUri, getEndpointUri, getProxy, setBaseUri, setBaseUri, setProxypublic String getServerId(String base, PublicKey publicKey, SecretKey secretKey)
base - Base server ID to use.publicKey - Public key to use.secretKey - Secret key to use.IllegalStateException - If the server ID hash algorithm is unavailable.public void joinServer(GameProfile profile, String authenticationToken, String serverId) throws RequestException
profile - Profile to join the server with.authenticationToken - Authentication token to join the server with.serverId - ID of the server to join.RequestException - If an error occurs while making the request.public GameProfile getProfileByServer(String name, String serverId) throws RequestException
name - Name of the user to get the profile of.serverId - ID of the server to check if they're logged in to.RequestException - If an error occurs while making the request.public GameProfile fillProfileProperties(GameProfile profile) throws ProfileException
profile - Profile to fill in the properties of.ProfileException - If the property lookup fails.Copyright © 2023. All rights reserved.