Fix updater

This commit is contained in:
gomeow
2013-04-06 09:55:57 -07:00
parent 07f222647f
commit 8bfbf76754
2 changed files with 7 additions and 5 deletions
@@ -55,16 +55,16 @@ public class Main extends JavaPlugin {
getServer().getPluginManager().registerEvents(new Listeners(this), this);
loadConfig();
startMetrics();
Updater u = new Updater(getDescription().getVersion());
if(getConfig().getBoolean("check-update")) {
Updater u = new Updater();
try {
if(u.getUpdate()) {
update = true;
name = u.getNewVersion();
}
} catch (Exception e) {
log.log(Level.SEVERE, "PlayerVaults: Failed to check for updates.");
log.log(Level.SEVERE, "PlayerVaults: Report this stack trace to drtshock and gomeow.");
log.log(Level.WARNING, "PlayerVaults: Failed to check for updates.");
log.log(Level.WARNING, "PlayerVaults: Report this stack trace to drtshock and gomeow.");
e.printStackTrace();
}
}