Class ProfileRequest
java.lang.Object
net.citizensnpcs.npc.skin.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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addHandler
(ProfileFetchHandler handler) Add one time result handler.Get the name of the player the requested profile belongs to.com.mojang.authlib.GameProfile
Get 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
@Nullable public com.mojang.authlib.GameProfile 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.
-