public static String getUUIDFromName(String name) {
try {
ProfileData profC = new ProfileData(name);
String UUID = null;
for (int i = 1; i <= 100; i++) {
PlayerProfile[] result = post(new URL("[url]https://api.mojang.com/profiles/page/[/url]" + i), Proxy.NO_PROXY, gson.toJson(profC).getBytes());
if (result.length == 0) {
break;
}
UUID = result[0].getId();
}
return UUID;
} catch (Exception e) {
e.printStackTrace();
}
return null;
}