Add / before endpoint to ensure the call always works

This commit is contained in:
Colin McDonald 2016-06-17 01:10:38 -04:00
parent de933bc571
commit 3c25095340

View File

@ -12,7 +12,7 @@ import java.util.UUID;
public class MojangUtils { public class MojangUtils {
public static void getName(UUID id, SingleResultCallback<String> callback) { public static void getName(UUID id, SingleResultCallback<String> callback) {
APIv3.getHttpClient().get("sessionserver.mojang.com", "session/minecraft/profile/" + id.toString().replace("-", ""), (response) -> { APIv3.getHttpClient().get("sessionserver.mojang.com", "/session/minecraft/profile/" + id.toString().replace("-", ""), (response) -> {
response.bodyHandler((body) -> { response.bodyHandler((body) -> {
Document resJson = Document.parse(body.toString()); Document resJson = Document.parse(body.toString());
String name = resJson.getString("name"); String name = resJson.getString("name");