From 0f7c5895f53fdc3b23c75bbf2ef63839bc28f546 Mon Sep 17 00:00:00 2001 From: Florian CUNY Date: Sun, 21 Apr 2019 10:39:01 +0200 Subject: [PATCH] Made the GitHub connection interval config check more permissive So that negative values will also disable the repeating task --- src/main/java/world/bentobox/bentobox/managers/WebManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/world/bentobox/bentobox/managers/WebManager.java b/src/main/java/world/bentobox/bentobox/managers/WebManager.java index 15ca077ac..84f21eaad 100644 --- a/src/main/java/world/bentobox/bentobox/managers/WebManager.java +++ b/src/main/java/world/bentobox/bentobox/managers/WebManager.java @@ -36,7 +36,7 @@ public class WebManager { this.gitHub = new GitHub(); long connectionInterval = plugin.getSettings().getGithubConnectionInterval() * 20L * 60L; - if (connectionInterval == 0) { + if (connectionInterval <= 0) { plugin.getServer().getScheduler().runTaskLaterAsynchronously(plugin, () -> requestGitHubData(true), 20L); } else { plugin.getServer().getScheduler().runTaskTimerAsynchronously(plugin, () -> requestGitHubData(true), 20L, connectionInterval);