mirror of
https://github.com/xfl03/MCCustomSkinLoader.git
synced 2026-11-20 06:29:38 +00:00
Remove: all vanilla editions
This commit is contained in:
1 parent
c2dad72690
commit
755f7647ed
136 files changed
+113
-1355
No files matched your search
@@ -0,0 +1,80 @@
|
||||
package customskinloader.loader.jsonapi;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
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.loader.JsonAPILoader;
|
||||
import customskinloader.plugin.ICustomSkinLoaderPlugin;
|
||||
import customskinloader.profile.ModelManager0;
|
||||
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 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/";
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ICustomSkinLoaderPlugin.IDefaultProfile> getDefaultProfiles(JsonAPILoader loader) {
|
||||
return Lists.newArrayList(new ElyBy(loader), new TLauncher(loader));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toJsonUrl(String root, String username) {
|
||||
return root + username;
|
||||
}
|
||||
|
||||
@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());
|
||||
return ModelManager0.toUserProfile(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "ElyByAPI";
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user