Package org.samo_lego.fabrictailor.util
Class SkinFetcher
java.lang.Object
org.samo_lego.fabrictailor.util.SkinFetcher
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Optional
<com.mojang.authlib.properties.Property> fetchSkinByName
(String playername) Sets skin by playername.static Optional
<com.mojang.authlib.properties.Property> fetchSkinByUrl
(String skinUrl, boolean useSlim) Sets skin setting from the provided URL.protected static Optional
<com.mojang.authlib.properties.Property> getSkinFromReply
(String reply) Sets skin from reply that was got from API.static Optional
<com.mojang.authlib.properties.Property> setSkinFromFile
(String skinFilePath, boolean useSlim) Gets skin data from file.
-
Constructor Details
-
SkinFetcher
public SkinFetcher()
-
-
Method Details
-
setSkinFromFile
public static Optional<com.mojang.authlib.properties.Property> setSkinFromFile(String skinFilePath, boolean useSlim) Gets skin data from file.- Parameters:
skinFilePath
- file pathuseSlim
- whether slim format should be used- Returns:
- property containing skin value and signature if successful, otherwise null.
-
fetchSkinByUrl
public static Optional<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
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
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.
-