From 19f895667a4e33cd2f5da15db605bdacc6721345 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Mon, 5 May 2014 19:53:16 +1200 Subject: [PATCH] Give the update messages without exceptions --- .../disguise/utilities/UpdateChecker.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/me/libraryaddict/disguise/utilities/UpdateChecker.java b/src/me/libraryaddict/disguise/utilities/UpdateChecker.java index efc2c3d9..63733fcb 100644 --- a/src/me/libraryaddict/disguise/utilities/UpdateChecker.java +++ b/src/me/libraryaddict/disguise/utilities/UpdateChecker.java @@ -25,8 +25,10 @@ public class UpdateChecker { if (version == null) { version = getBukkitVersion(); } - if (checkHigher(currentVersion, version)) { - latestVersion = version; + if (version != null) { + if (checkHigher(currentVersion, version)) { + latestVersion = version; + } } } @@ -48,8 +50,7 @@ public class UpdateChecker { } } } catch (Exception e) { - System.out.print("[LibsDisguises] Failed to check for a update on bukkit."); - e.printStackTrace(); + System.out.print("[LibsDisguises] Failed to check for a update on bukkit. " + e.getMessage()); } return null; } @@ -74,7 +75,6 @@ public class UpdateChecker { } } catch (Exception ex) { System.out.print("[LibsDisguises] Failed to check for a update on spigot. Now checking bukkit.."); - ex.printStackTrace(); } return null; }