mirror of
https://github.com/xfl03/MCCustomSkinLoader.git
synced 2026-11-24 00:09:38 +00:00
Added custom useragent
Faster mod loading Backup broken json Added a new skin site
This commit is contained in:
1 parent
4e78285bbe
commit
7654dc583d
9 files changed
+57
-20
No files matched your search
@@ -21,7 +21,7 @@ public class MojangAPILoader implements IProfileLoader {
|
||||
@Override
|
||||
public UserProfile loadProfile(SkinSiteProfile ssp, String username) throws Exception {
|
||||
//Get UUID Begin (http://wiki.vg/Mojang_API#Username_-.3E_UUID_at_time)
|
||||
String json0=HttpUtil0.readHttp("https://api.mojang.com/users/profiles/minecraft/"+username);
|
||||
String json0=HttpUtil0.readHttp("https://api.mojang.com/users/profiles/minecraft/"+username,ssp.userAgent);
|
||||
if(json0==null||json0.equals("")){
|
||||
CustomSkinLoader.logger.info("Profile not found.("+username+"'s UUID not found.)");
|
||||
return null;
|
||||
@@ -34,7 +34,7 @@ public class MojangAPILoader implements IProfileLoader {
|
||||
}
|
||||
//Get UUID End
|
||||
//Get Profile Begin (http://wiki.vg/Mojang_API#UUID_-.3E_Profile_.2B_Skin.2FCape)
|
||||
String json1=HttpUtil0.readHttp("https://sessionserver.mojang.com/session/minecraft/profile/"+uuidProfile.id);
|
||||
String json1=HttpUtil0.readHttp("https://sessionserver.mojang.com/session/minecraft/profile/"+uuidProfile.id,ssp.userAgent);
|
||||
if(json1==null||json1.equals("")){
|
||||
CustomSkinLoader.logger.info("Profile not found.("+username+"'s Profile is empty.)");
|
||||
return null;
|
||||
|
||||
Reference in new issue
Block a user