/**
* Check for updates
*/
protected void checkForUpdate() {
// create update checker
final UpdateChecker checker = new UpdateChecker();
// possibly check for updates in the internet on startup
this.getServer().getScheduler().scheduleAsyncDelayedTask(this, new Runnable() {
public void run() {
try {
String newVersion = checker.checkForUpdate(SimpleSpleef.simpleSpleef.getDescription().getVersion());
if (newVersion != null)
log.info("[SimpleSpleef] Update found for SimpleSpleef - please go to http://dev.bukkit.org/server-mods/simple-spleef/ to download version " + newVersion + "!");
} catch (Exception e) {
log.warning("[SimpleSpleef] Could not connect to remote server to check for update. Exception said: " + e.getMessage());
}
}
}, 0L);
// also check for updates in the configuration files and update them, if needed
checker.updateConfigurationVersion(this);
}