14.5 #17

Merged
JaTiTV merged 2 commits from 14.5 into development 2023-05-10 20:38:34 +00:00
2 changed files with 5 additions and 2 deletions
Showing only changes of commit 709bd16317 - Show all commits

View File

@ -49,6 +49,10 @@ public class T2CBupdateAPI {
private static String pluginVersion;
public static void onUpdateCheckTimer(Plugin plugin, String prefix, String discord, Integer spigotID, String url) {
Integer finalInterval;
if (T2CBlibConfig.getUpdateTimer() < 1){
finalInterval = 1;
} else finalInterval = T2CBlibConfig.getUpdateTimer();
ProxyServer.getInstance().getScheduler().schedule(plugin, new Runnable() {
public void run() {
if (T2CBlibConfig.getUpdateCheckFullDisable()) return;
@ -74,6 +78,6 @@ public class T2CBupdateAPI {
}
}, pluginVersion, spigotID, url);
}
}, 0, T2CBlibConfig.getUpdateTimer() * 60 * 20L, TimeUnit.SECONDS);
}, 0, finalInterval * 60 * 20L, TimeUnit.SECONDS);
}
}

View File

@ -3,7 +3,6 @@ package net.t2code.t2codelib.BUNGEE.api.update;
import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.plugin.Plugin;
import net.t2code.t2codelib.BUNGEE.system.config.T2CBlibConfig;
import net.t2code.t2codelib.SPIGOT.system.config.config.SelectLibConfig;
import net.t2code.t2codelib.T2CupdateObject;
import net.t2code.t2codelib.T2CupdateWebData;
import org.json.JSONArray;