Fix update checker once again

This commit is contained in:
Motschen
2021-06-08 15:19:34 +02:00
parent 73ff9615b5
commit 60e484e004
2 changed files with 2 additions and 2 deletions

View File

@@ -10,7 +10,7 @@ public class PuzzleCore implements ClientModInitializer {
public final static String name = "Puzzle"; public final static String name = "Puzzle";
public final static String id = "puzzle"; public final static String id = "puzzle";
public final static String website = "https://github.com/TeamMidnightDust/Puzzle"; public final static String website = "https://github.com/TeamMidnightDust/Puzzle";
public static String updateURL = website + "download"; public static String updateURL = website; //+"download";
public final static String UPDATE_URL = "https://raw.githubusercontent.com/TeamMidnightDust/Puzzle/1.17/puzzle_versions.json"; public final static String UPDATE_URL = "https://raw.githubusercontent.com/TeamMidnightDust/Puzzle/1.17/puzzle_versions.json";

View File

@@ -41,7 +41,7 @@ public class UpdateChecker {
}).thenAcceptAsync(versionMap -> { }).thenAcceptAsync(versionMap -> {
if (versionMap != null && versionMap.containsKey(minecraftVersion)) { if (versionMap != null && versionMap.containsKey(minecraftVersion)) {
latestVersion = versionMap.get(minecraftVersion); latestVersion = versionMap.get(minecraftVersion);
if (!latestVersion.equals(minecraftVersion)) { if (!latestVersion.equals(PuzzleCore.version)) {
isUpToDate = false; isUpToDate = false;
PuzzleCore.updateURL = PuzzleCore.website + "download/" + latestVersion.replace(PuzzleCore.name + " ",""); PuzzleCore.updateURL = PuzzleCore.website + "download/" + latestVersion.replace(PuzzleCore.name + " ","");
logger.log(Level.INFO, "There is a newer version of "+ PuzzleCore.name +" available: " + latestVersion); logger.log(Level.INFO, "There is a newer version of "+ PuzzleCore.name +" available: " + latestVersion);