Condense this into one function.

This commit is contained in:
GJ 2013-09-13 08:11:32 -04:00
parent 088015dd4d
commit 177604e94a

View File

@ -289,23 +289,19 @@ public class mcMMO extends JavaPlugin {
Updater updater = new Updater(this, "mcmmo", mcmmo, UpdateType.NO_DOWNLOAD, false);
if (updater.getResult() != UpdateResult.UPDATE_AVAILABLE) {
this.updateAvailable = false;
return;
}
if (updater.getLatestVersionString().contains("-beta") && !Config.getInstance().getPreferBeta()) {
this.updateAvailable = false;
return;
}
updateCheckerCallback(true);
}
public void updateCheckerCallback(boolean updateAvailable) {
this.updateAvailable = updateAvailable;
if (updateAvailable) {
this.updateAvailable = true;
getLogger().info(LocaleLoader.getString("UpdateChecker.outdated"));
getLogger().info(LocaleLoader.getString("UpdateChecker.newavailable"));
}
}
private void loadConfigFiles() {
// Force the loading of config files