mirror of
https://github.com/xfl03/MCCustomSkinLoader.git
synced 2026-11-13 21:54:02 +00:00
Added Custom Error Message for JsonAPI
This commit is contained in:
1 parent
e63858d561
commit
953748f2ae
4 files changed
+22
-11
No files matched your search
@@ -25,6 +25,10 @@ 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)){
|
||||
@@ -70,6 +74,9 @@ public class CustomSkinAPI implements IJsonAPI {
|
||||
public String skin;
|
||||
public String cape;
|
||||
public String elytra;
|
||||
|
||||
public int errno;
|
||||
public String msg;
|
||||
}
|
||||
@Override
|
||||
public String getName() {
|
||||
|
||||
Reference in new issue
Block a user