From 9c86069a851857fffb02abf3b4e5c4bbbb2489fd Mon Sep 17 00:00:00 2001 From: Auxilor Date: Sun, 11 Sep 2022 10:45:40 +0100 Subject: [PATCH] Added option to disable the update checker --- eco-api/src/main/java/com/willfp/eco/core/EcoPlugin.java | 2 +- eco-core/core-plugin/src/main/resources/config.yml | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/eco-api/src/main/java/com/willfp/eco/core/EcoPlugin.java b/eco-api/src/main/java/com/willfp/eco/core/EcoPlugin.java index 962fb9ab..cfd9bc96 100644 --- a/eco-api/src/main/java/com/willfp/eco/core/EcoPlugin.java +++ b/eco-api/src/main/java/com/willfp/eco/core/EcoPlugin.java @@ -350,7 +350,7 @@ public abstract class EcoPlugin extends JavaPlugin implements PluginLike { this.getLogger().info(""); this.getLogger().info("Loading " + this.getColor() + this.getName()); - if (this.getResourceId() != 0) { + if (this.getResourceId() != 0 && !Eco.getHandler().getEcoPlugin().getConfigYml().getBool("no-update-checker")) { new UpdateChecker(this).getVersion(version -> { DefaultArtifactVersion currentVersion = new DefaultArtifactVersion(this.getDescription().getVersion()); DefaultArtifactVersion mostRecentVersion = new DefaultArtifactVersion(version); diff --git a/eco-core/core-plugin/src/main/resources/config.yml b/eco-core/core-plugin/src/main/resources/config.yml index f42c5048..1c853e96 100644 --- a/eco-core/core-plugin/src/main/resources/config.yml +++ b/eco-core/core-plugin/src/main/resources/config.yml @@ -74,4 +74,9 @@ log-full-extension-errors: false displayed-recipes: true # Save health on leave and set it back on join - works around attribute modifiers. -health-fixer: false \ No newline at end of file +health-fixer: false + +# If eco plugins should not check for updates; only enable this if you know what you're doing +# as there can be urgent hotfixes that you are then not notified about. If you're confident +# that you can manage updates on your own, turn this on. +no-update-checker: false \ No newline at end of file