public static String uuidToName(String p_uuidToName_0_) { return Minecraft.func_71410_x() .func_152347_ac() .fillProfileProperties( new GameProfile(UUIDTypeAdapter.fromString(p_uuidToName_0_), (String) null), false) .getName(); }
public static LauncherProfiles load() throws IOException { System.out.println("Loading Minecraft profiles from " + DevLauncher.workingDirectory); try (FileReader reader = new FileReader(getFile())) { LauncherProfiles profiles = new LauncherProfiles(); JsonObject e = new JsonParser().parse(reader).getAsJsonObject(); for (Map.Entry<String, JsonElement> entry : e.entrySet()) { if (entry.getKey().equals("clientToken")) { profiles.clientToken = entry.getValue().getAsString(); } else if (entry.getKey().equals("authenticationDatabase")) { JsonObject o = entry.getValue().getAsJsonObject(); for (Map.Entry<String, JsonElement> entry1 : o.entrySet()) { profiles.authenticationDatabase.profiles.put( UUIDTypeAdapter.fromString(entry1.getKey()), GSON.fromJson(entry1.getValue(), OnlineProfile.class)); } } else { profiles.everythingElse.add(entry.getKey(), entry.getValue()); } } INSTANCE = profiles; return INSTANCE; } finally { if (INSTANCE == null) { INSTANCE = new LauncherProfiles(); } INSTANCE.markLoaded(); } }