mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-24 22:26:46 +01:00
Condense this into one function.
This commit is contained in:
parent
088015dd4d
commit
177604e94a
@ -289,22 +289,18 @@ 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) {
|
||||
getLogger().info(LocaleLoader.getString("UpdateChecker.outdated"));
|
||||
getLogger().info(LocaleLoader.getString("UpdateChecker.newavailable"));
|
||||
}
|
||||
this.updateAvailable = true;
|
||||
getLogger().info(LocaleLoader.getString("UpdateChecker.outdated"));
|
||||
getLogger().info(LocaleLoader.getString("UpdateChecker.newavailable"));
|
||||
}
|
||||
|
||||
private void loadConfigFiles() {
|
||||
|
Loading…
Reference in New Issue
Block a user