mirror of
https://github.com/xfl03/MCCustomSkinLoader.git
synced 2026-11-19 13:09:07 +00:00
Add: support WynntilsAPI cape
This commit is contained in:
1 parent
84072c62f3
commit
dd4b706827
14 files changed
+403
-158
No files matched your search
@@ -7,7 +7,6 @@ import com.google.common.collect.Lists;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.mojang.authlib.minecraft.MinecraftProfileTexture;
|
||||
import customskinloader.config.SkinSiteProfile;
|
||||
import customskinloader.loader.JsonAPILoader;
|
||||
import customskinloader.plugin.ICustomSkinLoaderPlugin;
|
||||
import customskinloader.profile.ModelManager0;
|
||||
@@ -16,17 +15,45 @@ import customskinloader.profile.UserProfile;
|
||||
public class ElyByAPI implements JsonAPILoader.IJsonAPI {
|
||||
|
||||
public static class ElyBy extends JsonAPILoader.DefaultProfile {
|
||||
public ElyBy(JsonAPILoader loader) { super(loader); }
|
||||
@Override public String getName() { return "ElyBy"; }
|
||||
@Override public int getPriority() { return 400; }
|
||||
@Override public String getRoot() { return "http://skinsystem.ely.by/textures/"; }
|
||||
public ElyBy(JsonAPILoader loader) {
|
||||
super(loader);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "ElyBy";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPriority() {
|
||||
return 400;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRoot() {
|
||||
return "http://skinsystem.ely.by/textures/";
|
||||
}
|
||||
}
|
||||
|
||||
public static class TLauncher extends JsonAPILoader.DefaultProfile {
|
||||
public TLauncher(JsonAPILoader loader) { super(loader); }
|
||||
@Override public String getName() { return "TLauncher"; }
|
||||
@Override public int getPriority() { return 550; }
|
||||
@Override public String getRoot() { return "https://auth.tlauncher.org/skin/profile/texture/login/"; }
|
||||
public TLauncher(JsonAPILoader loader) {
|
||||
super(loader);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "TLauncher";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPriority() {
|
||||
return 550;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRoot() {
|
||||
return "https://auth.tlauncher.org/skin/profile/texture/login/";
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -41,15 +68,11 @@ public class ElyByAPI implements JsonAPILoader.IJsonAPI {
|
||||
|
||||
@Override
|
||||
public UserProfile toUserProfile(String root, String json, boolean local) {
|
||||
Map<MinecraftProfileTexture.Type, MinecraftProfileTexture> result = new Gson().fromJson(json, new TypeToken<Map<MinecraftProfileTexture.Type, MinecraftProfileTexture>>() { }.getType());
|
||||
Map<MinecraftProfileTexture.Type, MinecraftProfileTexture> result = new Gson().fromJson(json, new TypeToken<Map<MinecraftProfileTexture.Type, MinecraftProfileTexture>>() {
|
||||
}.getType());
|
||||
return ModelManager0.toUserProfile(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPayload(SkinSiteProfile ssp) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "ElyByAPI";
|
||||
|
||||
Reference in new issue
Block a user