diff options
| author | LMBishop <13875753+LMBishop@users.noreply.github.com> | 2020-04-23 00:37:13 +0100 |
|---|---|---|
| committer | LMBishop <13875753+LMBishop@users.noreply.github.com> | 2020-04-23 00:37:13 +0100 |
| commit | 79bb091da7fdb7ccb2763a75d5d62e533a94296f (patch) | |
| tree | 1ce8f102d9923031a4a69ac404b3c9be8f6753bf /src/main/java/com | |
| parent | 08d7fb60f382d69bacc1d9e095f1107107446b75 (diff) | |
Ability to ignore update checker added
Diffstat (limited to 'src/main/java/com')
| -rw-r--r-- | src/main/java/com/leonardobishop/quests/Quests.java | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/main/java/com/leonardobishop/quests/Quests.java b/src/main/java/com/leonardobishop/quests/Quests.java index f1a65747..d9ee9d3f 100644 --- a/src/main/java/com/leonardobishop/quests/Quests.java +++ b/src/main/java/com/leonardobishop/quests/Quests.java @@ -180,10 +180,19 @@ public class Quests extends JavaPlugin { qPlayerManager.loadPlayer(player.getUniqueId(), false); } }); - Bukkit.getScheduler().runTaskAsynchronously(this, () -> { - updater = new Updater(this); - updater.check(); - }); + + // this intentionally should not be documented + boolean ignoreUpdates = false; + try { + ignoreUpdates = new File(this.getDataFolder() + File.separator + "stfuQuestsUpdate").exists(); + } catch (Throwable ignored) { } + + updater = new Updater(this); + if (!ignoreUpdates) { + Bukkit.getScheduler().runTaskAsynchronously(this, () -> { + updater.check(); + }); + } } @Override |
