Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,13 @@ public static void clean(@NotNull UUID uuid) {
} catch (IllegalArgumentException e) {
throw new RuntimeException("Could not parse UUID from Mojang API response", e);
}
if (!json.has("name")) {
throw new RuntimeException("Invalid response from Mojang API");
}
String name = json.get("name").getAsString();

// Create the profile
MojangProfile mojangProfile = new MojangProfile(uuid, username, System.currentTimeMillis());
MojangProfile mojangProfile = new MojangProfile(uuid, name, System.currentTimeMillis());

// Cache the profile
CACHED_PROFILE_MAP.put(uuid, mojangProfile);
Expand Down
Loading