use of net.dzikoysk.funnyguilds.concurrency.requests.DataSaveRequest in project FunnyGuilds by FunnyGuilds.
the class Manager method start.
public void start() {
if (FunnyGuilds.getInstance().isDisabling()) {
return;
}
if (this.task != null) {
return;
}
FunnyGuilds funnyGuilds = FunnyGuilds.getInstance();
ConcurrencyManager concurrencyManager = funnyGuilds.getConcurrencyManager();
long interval = this.getSettings().dataInterval * 60 * 20;
DataSaveRequest saveRequest = new DataSaveRequest();
this.task = Bukkit.getScheduler().runTaskTimerAsynchronously(funnyGuilds, () -> concurrencyManager.postRequests(saveRequest), interval, interval);
}
Aggregations