mirror of
https://github.com/xfl03/MCCustomSkinLoader.git
synced 2026-11-13 04:17:30 +00:00
Bump 14.5
This commit is contained in:
1 parent
953748f2ae
commit
f09fe38831
9 files changed
+107
-25
No files matched your search
@@ -25,10 +25,6 @@ public class CustomSkinAPI implements IJsonAPI {
|
||||
@Override
|
||||
public UserProfile toUserProfile(String root, String json, boolean local) {
|
||||
CustomSkinAPIProfile profile=CustomSkinLoader.GSON.fromJson(json, CustomSkinAPIProfile.class);
|
||||
if(profile.errno!=0){
|
||||
CustomSkinLoader.logger.info("Error "+profile.errno+": "+profile.msg);
|
||||
return null;
|
||||
}
|
||||
UserProfile p=new UserProfile();
|
||||
|
||||
if(StringUtils.isNotBlank(profile.skin)){
|
||||
@@ -54,10 +50,17 @@ public class CustomSkinAPI implements IJsonAPI {
|
||||
textures.putAll(profile.textures);
|
||||
if(textures.isEmpty())
|
||||
return p;
|
||||
|
||||
boolean hasSkin=false;
|
||||
for(String model:textures.keySet()){
|
||||
Model enumModel=ModelManager0.getEnumModel(model);
|
||||
if(enumModel==null||StringUtils.isEmpty(textures.get(model)))
|
||||
continue;
|
||||
if(ModelManager0.isSkin(enumModel))
|
||||
if(hasSkin)
|
||||
continue;
|
||||
else
|
||||
hasSkin=true;
|
||||
String url=root+TEXTURES+textures.get(model);
|
||||
if(local)
|
||||
url=HttpTextureUtil.getLocalFakeUrl(url);
|
||||
@@ -71,12 +74,14 @@ public class CustomSkinAPI implements IJsonAPI {
|
||||
public Map<String,String> textures;
|
||||
|
||||
public Map<String,String> skins;
|
||||
|
||||
public String skin;
|
||||
public String cape;
|
||||
public String elytra;
|
||||
|
||||
public int errno;
|
||||
public String msg;
|
||||
}
|
||||
@Override
|
||||
public String getPayload() {
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public String getName() {
|
||||
|
||||
Reference in new issue
Block a user