Give the update messages without exceptions

This commit is contained in:
libraryaddict 2014-05-05 19:53:16 +12:00
parent 6c0a08e95c
commit 19f895667a

View File

@ -25,8 +25,10 @@ public class UpdateChecker {
if (version == null) { if (version == null) {
version = getBukkitVersion(); version = getBukkitVersion();
} }
if (checkHigher(currentVersion, version)) { if (version != null) {
latestVersion = version; if (checkHigher(currentVersion, version)) {
latestVersion = version;
}
} }
} }
@ -48,8 +50,7 @@ public class UpdateChecker {
} }
} }
} catch (Exception e) { } catch (Exception e) {
System.out.print("[LibsDisguises] Failed to check for a update on bukkit."); System.out.print("[LibsDisguises] Failed to check for a update on bukkit. " + e.getMessage());
e.printStackTrace();
} }
return null; return null;
} }
@ -74,7 +75,6 @@ public class UpdateChecker {
} }
} catch (Exception ex) { } catch (Exception ex) {
System.out.print("[LibsDisguises] Failed to check for a update on spigot. Now checking bukkit.."); System.out.print("[LibsDisguises] Failed to check for a update on spigot. Now checking bukkit..");
ex.printStackTrace();
} }
return null; return null;
} }