From d23a45081af7f19cc5aae532b4977d31fbf23228 Mon Sep 17 00:00:00 2001 From: "Kristian S. Stangeland" Date: Tue, 15 Jan 2013 11:09:16 +0100 Subject: [PATCH] Better error messages - inform that updating is disabled for SNAPSHOTs. --- .../com/comphenix/protocol/metrics/Updater.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/metrics/Updater.java b/ProtocolLib/src/main/java/com/comphenix/protocol/metrics/Updater.java index 50ea9583..3133a434 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/metrics/Updater.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/metrics/Updater.java @@ -119,7 +119,12 @@ public class Updater /** * The updater found an update, but because of the UpdateType being set to NO_DOWNLOAD, it wasn't downloaded. */ - UPDATE_AVAILABLE(7, "The updater found an update, but because of the UpdateType being set to NO_DOWNLOAD, it wasn't downloaded."); + UPDATE_AVAILABLE(7, "The updater found an update, but because of the UpdateType being set to NO_DOWNLOAD, it wasn't downloaded."), + + /** + * Updating SNAPSHOT versions are not supported. Please perform a manual upgrade. + */ + NOT_SUPPORTED(8, "Updating SNAPSHOT versions are not supported. Please perform a manual upgrade."); private static final Map valueList = new HashMap(); private final int value; @@ -479,7 +484,12 @@ public class Updater remVer=-1; } - if(hasTag(version)||version.equalsIgnoreCase(remoteVersion)||curVer>=remVer) + if (hasTag(version)) + { + result = Updater.UpdateResult.NOT_SUPPORTED; + return false; + } + else if (version.equalsIgnoreCase(remoteVersion) || curVer>=remVer) { // We already have the latest version, or this build is tagged for no-update result = Updater.UpdateResult.NO_UPDATE;