Made the GitHub connection interval config check more permissive

So that negative values will also disable the repeating task
This commit is contained in:
Florian CUNY 2019-04-21 10:39:01 +02:00
parent f5df341212
commit 0f7c5895f5

View File

@ -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);