Package net.skinsrestorer.api
Class PropertyUtils
java.lang.Object
net.skinsrestorer.api.PropertyUtils
Utility class for retrieving information from profile properties related to skins.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MojangProfileResponsegetSkinProfileData(@NotNull String base64) Returns the decoded profile data from the profile property.static MojangProfileResponsegetSkinProfileData(@NotNull SkinProperty property) static StringgetSkinTextureHash(@NotNull String base64) Only returns the id at the end of the url.static StringgetSkinTextureHash(@NotNull SkinProperty property) static StringgetSkinTextureUrl(@NotNull String base64) Returns a Texture Url based on skin This is useful for skull plugins like Dynmap or DiscordSRV for example https://mc-heads.net/avatar/%texture_id%/%size%.pngstatic StringgetSkinTextureUrl(@NotNull SkinProperty property) static StringgetSkinTextureUrlStripped(@NotNull SkinProperty property) Deprecated, for removal: This API element is subject to removal in a future version.static SkinVariantgetSkinVariant(@NotNull String base64) static SkinVariantgetSkinVariant(@NotNull SkinProperty property)
-
Field Details
-
EMPTY_SKIN
To "clear"/"empty" a skin. Set this to remove the applies skin.
-
-
Constructor Details
-
PropertyUtils
public PropertyUtils()
-
-
Method Details
-
getSkinTextureUrl
Returns a Texture Url based on skin This is useful for skull plugins like Dynmap or DiscordSRV for example https://mc-heads.net/avatar/%texture_id%/%size%.png- Parameters:
base64- Profile value- Returns:
- full textures.minecraft.net url
-
getSkinTextureUrl
-
getSkinVariant
-
getSkinVariant
-
getSkinTextureHash
Only returns the id at the end of the url. Example: https://textures.minecraft.net/texture/cb50beab76e56472637c304a54b330780e278decb017707bf7604e484e4d6c9f Would return: cb50beab76e56472637c304a54b330780e278decb017707bf7604e484e4d6c9f- Parameters:
base64- Profile value- Returns:
- textures.minecraft.net id
- See Also:
-
getSkinTextureHash
-
getSkinTextureUrlStripped
@Deprecated(forRemoval=true) public static String getSkinTextureUrlStripped(@NotNull @NotNull SkinProperty property) Deprecated, for removal: This API element is subject to removal in a future version.UsegetSkinTextureHash(SkinProperty)instead. -
getSkinProfileData
Returns the decoded profile data from the profile property. This is useful for getting the skin data from the property and other information like cape. The user stored in this property may not be the same as the player who has the skin. APIs like MineSkin use multiple shared accounts to generate these properties. Or it could be the property of another player that the player set their skin to.- Parameters:
base64- Profile value- Returns:
- Decoded profile data as java object
-
getSkinProfileData
-
getSkinTextureHash(SkinProperty)instead.