From 5a914513b9eeb8f7d436575fe6d16456a61951d4 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Fri, 2 Dec 2016 12:49:40 +1100 Subject: [PATCH] Updating option --- core/src/main/java/com/boydti/fawe/Fawe.java | 16 +++++++++------- .../java/com/boydti/fawe/config/Settings.java | 2 ++ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/core/src/main/java/com/boydti/fawe/Fawe.java b/core/src/main/java/com/boydti/fawe/Fawe.java index 048560eb..4b617bba 100644 --- a/core/src/main/java/com/boydti/fawe/Fawe.java +++ b/core/src/main/java/com/boydti/fawe/Fawe.java @@ -237,13 +237,15 @@ public class Fawe { } }, 0); - // Delayed updating - TaskManager.IMP.async(new Runnable() { - @Override - public void run() { - Updater.update(implementation.getPlatform(), getVersion()); - } - }); + if (Settings.UPDATE) { + // Delayed updating + TaskManager.IMP.async(new Runnable() { + @Override + public void run() { + Updater.update(implementation.getPlatform(), getVersion()); + } + }); + } } private boolean isJava8 = MainUtil.getJavaVersion() >= 1.8; diff --git a/core/src/main/java/com/boydti/fawe/config/Settings.java b/core/src/main/java/com/boydti/fawe/config/Settings.java index 602dbded..41daf173 100644 --- a/core/src/main/java/com/boydti/fawe/config/Settings.java +++ b/core/src/main/java/com/boydti/fawe/config/Settings.java @@ -24,6 +24,8 @@ public class Settings extends Config { @Final public static String PLATFORM = null; // These values are set from FAWE before loading + @Comment("Allow the plugin to update") + public static boolean UPDATE = true; @Comment("Send anonymous usage statistics to MCStats.org") public static boolean METRICS = true; @Comment("FAWE will skip chunks when there's not enough memory available")