Package net.citizensnpcs.npc.profile
Class ProfileRequest
java.lang.Object
net.citizensnpcs.npc.profile.ProfileRequest
Stores basic information about a single profile used to request profiles from the Mojang servers.
Also stores the result of the request.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddHandler(ProfileFetchHandler handler) Add one time result handler.Get the name of the player the requested profile belongs to.com.mojang.authlib.GameProfileGet the game profile that was requested.Get the result of the profile fetch.
-
Constructor Details
-
ProfileRequest
Constructor.- Parameters:
playerName- The name of the player whose profile is being requested.handler- Optional handler to handle the result for the profile. Handler always invoked from the main thread.
-
-
Method Details
-
addHandler
Add one time result handler.Handler is always invoked from the main thread.
- Parameters:
handler- The result handler.
-
getPlayerName
Get the name of the player the requested profile belongs to. -
getProfile
Get the game profile that was requested.- Returns:
- The game profile or null if the profile has not been retrieved yet or there was an error while retrieving the profile.
-
getResult
Get the result of the profile fetch.
-