From 1b4941c99a0b7573f8a4a5a6f2877fca66448e5d Mon Sep 17 00:00:00 2001 From: Tyler Blair Date: Thu, 15 Sep 2011 23:38:43 -0300 Subject: [PATCH] Fix a typo, but this commit is mainly to make a build happen --- src/main/java/com/griefcraft/util/Updater.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/griefcraft/util/Updater.java b/src/main/java/com/griefcraft/util/Updater.java index 6a95d934..97bfef15 100644 --- a/src/main/java/com/griefcraft/util/Updater.java +++ b/src/main/java/com/griefcraft/util/Updater.java @@ -254,12 +254,13 @@ public boolean tryAutoUpdate(boolean forceUpdate) { } } - // we shouldn't update if the current version is equal to the latest - if (LWCInfo.FULL_VERSION.equals(latestVersion)) { + // we shouldn't update if the current version is the same as the latest, or their build numbers are equal + Version current = LWCInfo.FULL_VERSION; + if (current.equals(latestVersion) || (current.getBuildNumber() > 0 && latestVersion.getBuildNumber() > 0 && current.getBuildNumber() == latestVersion.getBuildNumber())) { return false; } - logger.info("LWC: Updating found!"); + logger.info(Colors.Red + "LWC update found!"); // update_site/download/LWC.jar UpdaterFile file = new UpdaterFile("plugins/LWC.jar", getLatestDownloadURL());