diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/core/services/MetricsService.java b/src/main/java/io/github/thebusybiscuit/slimefun4/core/services/MetricsService.java index 4e2ab0f1b6..1c6d456692 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/core/services/MetricsService.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/core/services/MetricsService.java @@ -235,7 +235,6 @@ private boolean download(int version) { downloadMonitor(HttpResponse.BodyHandlers.ofFile(file.toPath())) ); - if (response.statusCode() >= 200 && response.statusCode() < 300) { plugin.getLogger().log(Level.INFO, "Successfully downloaded {0} build: #{1}", new Object[] { JAR_NAME, version }); @@ -246,6 +245,8 @@ private boolean download(int version) { metricVersion = String.valueOf(version); hasDownloadedUpdate = true; return true; + } else { + plugin.getLogger().log(Level.WARNING, "Failed to download the latest jar file from GitHub. Response code: {0}", response.statusCode()); } } catch (InterruptedException | JsonParseException e) { plugin.getLogger().log(Level.WARNING, "Failed to fetch the latest jar file from the builds page. Perhaps GitHub is down? Response: {0}", e.getMessage());