Fix skin loading

This commit is contained in:
fullwall 2014-08-05 22:32:31 -07:00
parent 11a3608f5e
commit 3fb0176c5d

View File

@ -123,8 +123,8 @@ public class HumanController extends AbstractEntityController {
.append(UUIDTypeAdapter.fromUUID(profile.getId())).toString()); .append(UUIDTypeAdapter.fromUUID(profile.getId())).toString());
url = HttpAuthenticationService.concatenateURL(url, url = HttpAuthenticationService.concatenateURL(url,
new StringBuilder().append("unsigned=").append(!requireSecure).toString()); new StringBuilder().append("unsigned=").append(!requireSecure).toString());
MinecraftProfilePropertiesResponse response = (MinecraftProfilePropertiesResponse) MAKE_REQUEST.invoke(url, MinecraftProfilePropertiesResponse response = (MinecraftProfilePropertiesResponse) MAKE_REQUEST.invoke(
null, MinecraftProfilePropertiesResponse.class); auth, url, null, MinecraftProfilePropertiesResponse.class);
if (response == null) { if (response == null) {
return profile; return profile;
} }
@ -140,6 +140,7 @@ public class HumanController extends AbstractEntityController {
try { try {
realUUID = uuid.call(); realUUID = uuid.call();
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace();
return; return;
} }
GameProfile skinProfile = null; GameProfile skinProfile = null;
@ -150,6 +151,8 @@ public class HumanController extends AbstractEntityController {
} catch (Exception e) { } catch (Exception e) {
if (e.getMessage().contains("too many requests")) { if (e.getMessage().contains("too many requests")) {
Bukkit.getScheduler().runTaskLaterAsynchronously(CitizensAPI.getPlugin(), this, 200); Bukkit.getScheduler().runTaskLaterAsynchronously(CitizensAPI.getPlugin(), this, 200);
} else {
e.printStackTrace();
} }
return; return;
} }