Package net.skinsrestorer.api
Class PropertyUtils
java.lang.Object
net.skinsrestorer.api.PropertyUtils
Utility class for retrieving information from profile properties related to skins.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic MojangProfileResponse
getSkinProfileData
(@NotNull SkinProperty property) Returns the decoded profile data from the profile property.static String
getSkinTextureUrl
(@NotNull SkinProperty property) 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 String
getSkinTextureUrlStripped
(@NotNull SkinProperty property) Only returns the id at the end of the url.static SkinVariant
getSkinVariant
(@NotNull SkinProperty property)
-
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:
property
- Profile property- Returns:
- full textures.minecraft.net url
-
getSkinVariant
-
getSkinTextureUrlStripped
Only returns the id at the end of the url. Example: https://textures.minecraft.net/texture/cb50beab76e56472637c304a54b330780e278decb017707bf7604e484e4d6c9f Would return: cb50beab76e56472637c304a54b330780e278decb017707bf7604e484e4d6c9f- Parameters:
property
- Profile property- Returns:
- textures.minecraft.net id
- See Also:
-
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:
property
- Profile property- Returns:
- Decoded profile data as java object
-