Class PropertyUtils

java.lang.Object
net.skinsrestorer.api.PropertyUtils

public class PropertyUtils extends Object
Utility class for retrieving information from profile properties related to skins.
  • Constructor Details

    • PropertyUtils

      public PropertyUtils()
  • Method Details

    • getSkinTextureUrl

      public static String getSkinTextureUrl(@NotNull @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%.png
      Parameters:
      property - Profile property
      Returns:
      full textures.minecraft.net url
    • getSkinVariant

      public static SkinVariant getSkinVariant(@NotNull @NotNull SkinProperty property)
    • getSkinTextureUrlStripped

      public static String getSkinTextureUrlStripped(@NotNull @NotNull SkinProperty property)
      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

      public static MojangProfileResponse getSkinProfileData(@NotNull @NotNull SkinProperty property)
      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