mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2024-12-28 03:57:38 +01:00
Fixes #991
This commit is contained in:
parent
c71d872517
commit
af43e19018
@ -269,12 +269,12 @@ public class Fawe {
|
||||
|
||||
TaskManager.IMP.repeat(timer, 1);
|
||||
|
||||
// if (Settings.IMP.UPDATE) {
|
||||
// Delayed updating
|
||||
updater = new Updater();
|
||||
TaskManager.IMP.async(() -> update());
|
||||
TaskManager.IMP.repeatAsync(() -> update(), 36000);
|
||||
// }
|
||||
if (!Settings.IMP.UPDATE.equalsIgnoreCase("false")) {
|
||||
// Delayed updating
|
||||
updater = new Updater();
|
||||
TaskManager.IMP.async(() -> update());
|
||||
TaskManager.IMP.repeatAsync(() -> update(), 36000);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean update() {
|
||||
|
@ -26,8 +26,9 @@ public class Settings extends Config {
|
||||
@Comment({"Options: de, ru, tr",
|
||||
"Create a PR to contribute a translation: https://github.com/boy0001/FastAsyncWorldedit/new/master/core/src/main/resources",})
|
||||
public String LANGUAGE = "";
|
||||
@Comment("Enable or disable automatic updates")
|
||||
public boolean UPDATE = false;
|
||||
@Comment({"Enable or disable automatic updates",
|
||||
" - true = update automatically in the background"})
|
||||
public String UPDATE = "confirm";
|
||||
@Comment("Send anonymous usage statistics")
|
||||
public boolean METRICS = true;
|
||||
@Comment({
|
||||
|
@ -102,11 +102,11 @@ public class Updater {
|
||||
}
|
||||
outFile.renameTo(finalFile);
|
||||
|
||||
if (Settings.IMP.UPDATE) {
|
||||
if (Settings.IMP.UPDATE.equalsIgnoreCase("true")) {
|
||||
installUpdate(null);
|
||||
Fawe.debug("Updated FAWE to " + versionString + " @ " + pendingFile);
|
||||
MainUtil.sendAdmin("&a/restart&7 to update FAWE with these changes: &c/fawe changelog &7or&c " + "https://empcraft.com/fawe/cl?" + Integer.toHexString(currentVersion.hash));
|
||||
} else {
|
||||
} else if (!Settings.IMP.UPDATE.equalsIgnoreCase("false")) {
|
||||
pendingFile = finalFile;
|
||||
destFile = new File(jarFile.getParent(), "update" + File.separator + jarFile.getName());
|
||||
pending = true;
|
||||
|
Loading…
Reference in New Issue
Block a user