Class SkullTexture.CraftHead
java.lang.Object
com.saicone.rtag.util.SkullTexture
com.saicone.rtag.util.SkullTexture.CraftHead
- Enclosing class:
SkullTexture
CraftHead SkullTexture implementation that retrieves profiles using CraftHead API.
-
Nested Class Summary
Nested classes/interfaces inherited from class SkullTexture
SkullTexture.CraftHead, SkullTexture.Mojang, SkullTexture.PlayerDB, SkullTexture.Profile -
Field Summary
Fields inherited from class SkullTexture
cache, executor -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a SkullTexture instance with default parameters.CraftHead(@Nullable com.google.common.cache.Cache<String, SkullTexture.Profile> cache) Constructs a SkullTexture instance with provided cache object.CraftHead(@Nullable com.google.common.cache.Cache<String, SkullTexture.Profile> cache, @NotNull Executor executor) Constructs a SkullTexture instance with provided cache object and executor.Constructs a SkullTexture instance with provided executor. -
Method Summary
Modifier and TypeMethodDescriptionfetchProfile(@NotNull String name) Fetch profile value using player name.fetchProfile(@NotNull UUID uniqueId) Fetch profile value using player unique id.Methods inherited from class SkullTexture
caching, computePlayerTexture, computePlayerTexture, craftHead, encodeUrl, encodeUrlId, fetchJson, getProfile, getProfile, getTexturedHead, getTexturedHead, getTextureValue, getTextureValue, item, itemAsync, itemAsync, mojang, playerDB, profileFrom, profileFromId, profileFromId, profileFromName, profileFromPlayer, profileSession, requestTextureUrl, setProfile, setTexture
-
Constructor Details
-
CraftHead
public CraftHead()Constructs a SkullTexture instance with default parameters. -
CraftHead
public CraftHead(@Nullable @Nullable com.google.common.cache.Cache<String, SkullTexture.Profile> cache) Constructs a SkullTexture instance with provided cache object.- Parameters:
cache- the cache to save encoded textures.
-
CraftHead
-
CraftHead
public CraftHead(@Nullable @Nullable com.google.common.cache.Cache<String, SkullTexture.Profile> cache, @NotNull @NotNull Executor executor) Constructs a SkullTexture instance with provided cache object and executor.- Parameters:
cache- the cache to save encoded textures.executor- the default executor to use in async operations.
-
-
Method Details
-
fetchProfile
Description copied from class:SkullTextureFetch profile value using player name.- Overrides:
fetchProfilein classSkullTexture- Parameters:
name- the player name to find.- Returns:
- a profile value if found,
SkullTexture.Profile.empty()otherwise.
-
fetchProfile
Description copied from class:SkullTextureFetch profile value using player unique id.- Overrides:
fetchProfilein classSkullTexture- Parameters:
uniqueId- the unique id to find.- Returns:
- a profile value if found,
SkullTexture.Profile.empty()otherwise.
-