public async static void RefreshMinecraftVersions() { string json = await GetMinecraftVersionManifestAsync(); if (!string.IsNullOrWhiteSpace(json)) { MinecraftVersionsList list = GetMinecraftVersions(json); if (list != null) { VersionsList = list; } } }
public static MinecraftVersionsList GetMinecraftVersions(string json) { if (string.IsNullOrWhiteSpace(json)) { return(null); } try { VersionsList = JsonConvert.DeserializeObject <MinecraftVersionsList>(json); return(VersionsList); } catch (JsonException) { return(null); } }
public async static void Init() { VersionsList = await GetMinecraftVersionsFromFileAsync(); RefreshMinecraftVersions(); }