Package xyz.xenondevs.invui.item.builder
Class SkullBuilder.HeadTexture
java.lang.Object
xyz.xenondevs.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 TypeMethodDescription@NotNull StringGets the stored texture value.static voidDeprecated.static @NotNull SkullBuilder.HeadTextureDeprecated.Prefer usingHeadTexture(String)with a hardcoded texture value instead of querying the Mojang API.static @NotNull SkullBuilder.HeadTextureDeprecated.Prefer usingHeadTexture(String)with a hardcoded texture value instead of querying the Mojang API.static @NotNull SkullBuilder.HeadTextureof(@NotNull org.bukkit.OfflinePlayer offlinePlayer) Deprecated.Prefer usingHeadTexture(String)with a hardcoded texture value instead of querying the Mojang API.
-
Constructor Details
-
HeadTexture
Creates a newSkullBuilder.HeadTexturefrom the raw texture value.- Parameters:
textureValue- The texture value of thisSkullBuilder.HeadTexture- See Also:
-
-
Method Details
-
of
@Deprecated @NotNull public static @NotNull SkullBuilder.HeadTexture of(@NotNull @NotNull org.bukkit.OfflinePlayer offlinePlayer) throws MojangApiUtils.MojangApiException, IOException Deprecated.Prefer usingHeadTexture(String)with a hardcoded texture value instead of querying the Mojang API.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. - Throws:
MojangApiUtils.MojangApiException- If the Mojang API returns an error.IOException- If an I/O error occurs.- See Also:
-
of
@Deprecated @NotNull public static @NotNull SkullBuilder.HeadTexture of(@NotNull @NotNull String playerName) throws MojangApiUtils.MojangApiException, IOException Deprecated.Prefer usingHeadTexture(String)with a hardcoded texture value instead of querying the Mojang API.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. - Throws:
MojangApiUtils.MojangApiException- If the Mojang API returns an error.IOException- If an I/O error occurs.- See Also:
-
of
@Deprecated @NotNull public static @NotNull SkullBuilder.HeadTexture of(@NotNull @NotNull UUID uuid) throws MojangApiUtils.MojangApiException, IOException Deprecated.Prefer usingHeadTexture(String)with a hardcoded texture value instead of querying the Mojang API.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. - Throws:
MojangApiUtils.MojangApiException- If the Mojang API returns an error.IOException- If an I/O error occurs.
-
invalidateCache
Deprecated.Prefer usingHeadTexture(String)with a hardcoded texture value instead of querying the Mojang API.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.
-
HeadTexture(String)with a hardcoded texture value instead of querying the Mojang API.