Browse Source

changed human skin loader into a folder serverside

Kajetan Johannes Hammerle 5 years ago
parent
commit
b491aa4fc1
1 changed files with 4 additions and 5 deletions
  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;
             HttpURLConnection httpurlconnection = null;
             try
             try
             {
             {
-                //httpurlconnection = (HttpURLConnection)(new URL("http://skins.minecraft.net/MinecraftSkins/" + name + ".png"))
+                URL url = new URL("http://skins.hammerle.me/skins/" + name + ".png");
-                httpurlconnection = (HttpURLConnection) (new URL("http://skins.hammerle.me/" + name + ".png"))
+                httpurlconnection = (HttpURLConnection) url.openConnection(Minecraft.getInstance().getProxy());
-                        .openConnection(Minecraft.getInstance().getProxy());
                 httpurlconnection.setDoInput(true);
                 httpurlconnection.setDoInput(true);
                 httpurlconnection.setDoOutput(false);
                 httpurlconnection.setDoOutput(false);
                 httpurlconnection.connect();
                 httpurlconnection.connect();
-
+                
-                int code = httpurlconnection.getResponseCode();
+                int code = httpurlconnection.getResponseCode();               
                 if(code != 200)
                 if(code != 200)
                 {
                 {
                     // Failed own server, trying crafatar
                     // Failed own server, trying crafatar