Class SkinFetcher

java.lang.Object
org.samo_lego.fabrictailor.util.SkinFetcher

public class SkinFetcher extends Object
  • Constructor Details

    • SkinFetcher

      public SkinFetcher()
  • Method Details

    • setSkinFromFile

      public static com.mojang.authlib.properties.Property setSkinFromFile(String skinFilePath, boolean useSlim)
      Gets skin data from file.
      Parameters:
      skinFilePath - file path
      useSlim - whether slim format should be used
      Returns:
      property containing skin value and signature if successful, otherwise null.
    • fetchSkinByUrl

      @Nullable public static @Nullable com.mojang.authlib.properties.Property fetchSkinByUrl(String skinUrl, boolean useSlim)
      Sets skin setting from the provided URL.
      Parameters:
      skinUrl - string url of the skin
      Returns:
      property containing skin value and signature if successful, otherwise null.
    • fetchSkinByName

      @Nullable public static @Nullable com.mojang.authlib.properties.Property fetchSkinByName(String playername)
      Sets skin by playername.
      Parameters:
      playername - name of the player who has the skin wanted
      Returns:
      property containing skin value and signature if successful, otherwise null.
    • getSkinFromReply

      @Nullable protected static @Nullable com.mojang.authlib.properties.Property getSkinFromReply(String reply)
      Sets skin from reply that was got from API. Used internally only.
      Parameters:
      reply - API reply
      Returns:
      property containing skin value and signature if successful, otherwise null.