Skip to content

Commit

Permalink
Fix VersionChecker for 1.12.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Lezurex committed Mar 14, 2021
1 parent 4715da4 commit 5169ed2
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ private void checkForUpdates() {

String downloadUrl;

if(Minecraft.getMinecraft().getVersion().contains("1.8"))
if(Minecraft.getMinecraft().getVersion().contains("1.8")) {
downloadUrl = jsonElement.getAsJsonObject().get("assets").getAsJsonArray().get(0).getAsJsonObject().get("browser_download_url").getAsString();
else {
if(jsonElement.getAsJsonObject().get("assets").getAsJsonArray().get(1).getAsJsonObject() == null) {
} else {
if(jsonElement.getAsJsonObject().get("assets").getAsJsonArray().size() < 2) {
LabyMod.getInstance().displayMessageInChat(StatsAddon.getInstance().getPrefix() + "\u00A77 Momentan ist \u00A7ckeine neue Version \u00A77für die 1.12.2 verfügbar\u00A78.");
return;
} else
Expand Down

0 comments on commit 5169ed2

Please sign in to comment.