From 5c2eaddacd14e045efd4841cedc890bc1a02e096 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laura=20Endre=C3=9F?= Date: Tue, 27 Apr 2021 09:19:11 +0200 Subject: [PATCH] Fix Custom Skin download (Profile not authenticating) --- pom.xml | 2 +- .../sourcewriters/minecraft/vcompat/skin/Profile.java | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index bb6d240..0ed9ff2 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ 4.0.0 net.sourcewriters.minecraft vcompat - 2.1.3 + 2.1.4 vCompat diff --git a/src/main/java/net/sourcewriters/minecraft/vcompat/skin/Profile.java b/src/main/java/net/sourcewriters/minecraft/vcompat/skin/Profile.java index e8bb234..6c2c5fb 100644 --- a/src/main/java/net/sourcewriters/minecraft/vcompat/skin/Profile.java +++ b/src/main/java/net/sourcewriters/minecraft/vcompat/skin/Profile.java @@ -74,12 +74,7 @@ public boolean validate() { int code = request.execute(String.format(AUTH_SERVER, "validate"), StandardContentType.JSON).getCode(); - if (code == 204) { - return true; - } else { - return false; - } - + return code == 204 || code == 200; } catch (IOException ignore) { return false; } @@ -148,7 +143,7 @@ public Profile authenticate() { authToken = null; - if (!object.has("selectedProfile")) { + if (!response.has("selectedProfile")) { return this; }