diff --git a/src/main/java/eu/m724/giants/updater/UpdateCommand.java b/src/main/java/eu/m724/giants/updater/UpdateCommand.java index f0ff445..a7aa963 100644 --- a/src/main/java/eu/m724/giants/updater/UpdateCommand.java +++ b/src/main/java/eu/m724/giants/updater/UpdateCommand.java @@ -52,6 +52,15 @@ public class UpdateCommand { if (args.length == 1) { // remember this function is proxied updater.getLatestVersion().thenAccept(metadata -> { + updater.getCurrentVersion().thenAccept(metadata2 -> { + sender.sendMessage("You're on Giants " + metadata2.getLabel() + " released " + formatDate(metadata2.getTimestamp())); + sendChangelogMessage(sender, metadata2.getChangelogUrl()); + }).exceptionally(e -> { + sender.sendMessage("Error retrieving information about current version, see console for details. " + e.getMessage()); + e.printStackTrace(); + return null; + }); + if (metadata != null) { sender.sendMessage("An update is available!"); sender.sendMessage("Giants " + metadata.getLabel() + " released " + formatDate(metadata.getTimestamp())); @@ -59,14 +68,6 @@ public class UpdateCommand { sender.sendMessage("To download: /giants update download"); } else { sender.sendMessage("No new updates"); - updater.getCurrentVersion().thenAccept(metadata2 -> { - sender.sendMessage("You're on Giants " + metadata2.getLabel() + " released " + formatDate(metadata2.getTimestamp())); - sendChangelogMessage(sender, metadata2.getChangelogUrl()); - }).exceptionally(e -> { - sender.sendMessage("Error retrieving information about current version, see console for details. " + e.getMessage()); - e.printStackTrace(); - return null; - }); } }).exceptionally(e -> { sender.sendMessage("Error checking for update. See console for details.");