@@ -0,0 +1,1839 @@
+package protocolsupportpocketstuff.api.util;%0A%0Aimport protocolsupport.libs.com.google.gson.JsonObject;%0Aimport protocolsupport.libs.com.google.gson.JsonParser;%0A%0Aimport java.util.Base64;%0A%0Apublic class SkinUtils %7B%0A%09/***%0A%09 * Gets the SkinDataWrapper from a base64 encoded skin property%0A%09 * @param property%0A%09 * @return an wrapper containing the skin URL and the skin metadata%0A%09 */%0A%09public static SkinDataWrapper readSkinDataFromProperty(String property) %7B%0A%09%09// readSkinDataFromProperty(%22eyJ0aW1lc3RhbXAiOjE1MDQ4MDUzODE0NDUsInByb2ZpbGVJZCI6IjdjZjc2MTFkYmY2YjQxOWRiNjlkMmQzY2Q4NzUxZjRjIiwicHJvZmlsZU5hbWUiOiJrYXJldGg5OTkiLCJzaWduYXR1cmVSZXF1aXJlZCI6dHJ1ZSwidGV4dHVyZXMiOnsiU0tJTiI6eyJtZXRhZGF0YSI6eyJtb2RlbCI6InNsaW0ifSwidXJsIjoiaHR0cDovL3RleHR1cmVzLm1pbmVjcmFmdC5uZXQvdGV4dHVyZS85NTEzOWNmM2EwMmY2MmUxYWY5ZjZiYWQxNDc5ZTZjNDdjNTQ0ZTFlZDNkNjlmMThmMTVkNjkyYmM4ZDI0ZTkifX19%22);%0A%09%09// First we are going to base64 decode the property%0A%09%09byte%5B%5D decodedByteArray = Base64.getDecoder().decode(property);%0A%09%09String decoded = new String(decodedByteArray);%0A%0A%09%09JsonObject element = new JsonParser().parse(decoded).getAsJsonObject();%0A%0A%09%09JsonObject skinObject = element.get(%22textures%22).getAsJsonObject().get(%22SKIN%22).getAsJsonObject();%0A%0A%09%09String skinUrl = skinObject.get(%22url%22).getAsString(); // Skin URL%0A%09%09boolean isSlim = skinObject.has(%22metadata%22) && skinObject.get(%22metadata%22).getAsJsonObject().has(%22model%22) && skinObject.get(%22metadata%22).getAsJsonObject().get(%22model%22).getAsString().equals(%22slim%22);%0A%0A%09%09return new SkinDataWrapper(skinUrl, isSlim);%0A%09%7D%0A%0A%09static class SkinDataWrapper %7B%0A%09%09private String skinUrl;%0A%09%09private boolean isSlim;%0A%0A%09%09public SkinDataWrapper(String skinUrl, boolean isSlim) %7B%0A%09%09%09this.skinUrl = skinUrl;%0A%09%09%09this.isSlim = isSlim;%0A%09%09%7D%0A%0A%09%09public String getSkinUrl() %7B%0A%09%09%09return skinUrl;%0A%09%09%7D%0A%0A%09%09public boolean isSlim() %7B%0A%09%09%09return isSlim;%0A%09%09%7D%0A%09%7D%0A%7D%0A

Add "SkinUtils", "SkinUtils#readSkinDataFromProperty"