Add / before endpoint to ensure the call always works
This commit is contained in:
parent
de933bc571
commit
3c25095340
@ -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");
|
||||||
|
Loading…
Reference in New Issue
Block a user