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
ConstructorsConstructorDescriptionProfileRequest
(String playerName, Consumer<ProfileRequest> handler) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addHandler
(Consumer<ProfileRequest> handler) Add one time result handler.boolean
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.int
hashCode()
-
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.
-
equals
-
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. -
hashCode
public int hashCode()
-