Package de.studiocode.invui.item.builder
Class SkullBuilder.HeadTexture
java.lang.Object
de.studiocode.invui.item.builder.SkullBuilder.HeadTexture
- All Implemented Interfaces:
Serializable
- Enclosing class:
- SkullBuilder
Contains the texture value for a player head.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionHeadTexture(@NotNull String textureValue) Creates a newSkullBuilder.HeadTexturefrom the raw texture value. -
Method Summary
Modifier and TypeMethodDescriptionGets the stored texture value.static voidInvalidates the uuid and texture value cache.static SkullBuilder.HeadTextureRetrieves theSkullBuilder.HeadTexturefrom the username of the skull owner.static SkullBuilder.HeadTextureRetrieves theSkullBuilder.HeadTexturefrom theUUIDof the skull owner.static SkullBuilder.HeadTextureof(@NotNull org.bukkit.OfflinePlayer offlinePlayer) Retrieves theSkullBuilder.HeadTexturefrom thisOfflinePlayerPlease note that this data might not be pulled from the Mojang API as it might already be cached.
-
Constructor Details
-
HeadTexture
Creates a newSkullBuilder.HeadTexturefrom the raw texture value.- Parameters:
textureValue- The texture value of thisSkullBuilder.HeadTexture- See Also:
-
-
Method Details
-
of
Retrieves theSkullBuilder.HeadTexturefrom thisOfflinePlayerPlease note that this data might not be pulled from the Mojang API as it might already be cached. UseinvalidateCache()to invalidate the cache.- Parameters:
offlinePlayer- The skull owner.- Returns:
- The
SkullBuilder.HeadTextureof that player. - See Also:
-
of
Retrieves theSkullBuilder.HeadTexturefrom the username of the skull owner. This will first retrieve theUUIDof the player from either Bukkit's usercache.json file (if the server is in only mode) or from the Mojang API (if the server is in offline mode).Please note that this data might not be pulled from the Mojang API as it might already be cached. Use
invalidateCache()to invalidate the cache.- Parameters:
playerName- The username of the player.- Returns:
- The
SkullBuilder.HeadTextureof that player. - See Also:
-
of
Retrieves theSkullBuilder.HeadTexturefrom theUUIDof the skull owner. Please note that this data might not be pulled from the Mojang API as it might already be cached. UseinvalidateCache()to invalidate the cache.- Parameters:
uuid- TheUUIDof the skull owner.- Returns:
- The
SkullBuilder.HeadTextureof that player.
-
invalidateCache
public static void invalidateCache()Invalidates the uuid and texture value cache. This means that whenof(OfflinePlayer),of(UUID)andof(String)are called, these values will be pulled from the Mojang API again. -
getTextureValue
Gets the stored texture value.- Returns:
- The stored texture value.
-