Ver Fonte

changed human skin loader into a folder serverside

Kajetan Johannes Hammerle há 5 anos atrás
pai
commit
b491aa4fc1
1 ficheiros alterados com 4 adições e 5 exclusões
  1. 4 5
      src/main/java/me/km/entities/HumanSkinLoader.java

+ 4 - 5
src/main/java/me/km/entities/HumanSkinLoader.java

@@ -56,14 +56,13 @@ public class HumanSkinLoader
             HttpURLConnection httpurlconnection = null;
             try
             {
-                //httpurlconnection = (HttpURLConnection)(new URL("http://skins.minecraft.net/MinecraftSkins/" + name + ".png"))
-                httpurlconnection = (HttpURLConnection) (new URL("http://skins.hammerle.me/" + name + ".png"))
-                        .openConnection(Minecraft.getInstance().getProxy());
+                URL url = new URL("http://skins.hammerle.me/skins/" + name + ".png");
+                httpurlconnection = (HttpURLConnection) url.openConnection(Minecraft.getInstance().getProxy());
                 httpurlconnection.setDoInput(true);
                 httpurlconnection.setDoOutput(false);
                 httpurlconnection.connect();
-
-                int code = httpurlconnection.getResponseCode();
+                
+                int code = httpurlconnection.getResponseCode();               
                 if(code != 200)
                 {
                     // Failed own server, trying crafatar