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.
  • Field Details

    • EMPTY_SKIN

      public static final SkinProperty EMPTY_SKIN
      To "clear"/"empty" a skin. Set this to remove the applies skin.
  • Constructor Details

    • PropertyUtils

      public PropertyUtils()
  • Method Details

    • getSkinTextureUrl

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

      public static String getSkinTextureUrl(@NotNull @NotNull SkinProperty property)
    • getSkinVariant

      public static SkinVariant getSkinVariant(@NotNull @NotNull String base64)
    • getSkinVariant

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

      public static String getSkinTextureHash(@NotNull @NotNull String base64)
      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

      public static String getSkinTextureHash(@NotNull @NotNull SkinProperty property)
    • 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.
    • getSkinProfileData

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

      public static MojangProfileResponse getSkinProfileData(@NotNull @NotNull SkinProperty property)