1
0
mirror of https://github.com/lucko/LuckPerms.git synced 2025-09-25 21:38:59 +02:00

Change users being updated async and refactor update task

This commit is contained in:
Luck
2016-06-17 23:23:28 +01:00
parent 00c3a8b415
commit 484bc44288
9 changed files with 51 additions and 54 deletions

View File

@@ -55,12 +55,12 @@ public class LPBukkitPlugin extends JavaPlugin implements LuckPermsPlugin {
groupManager = new GroupManager(this);
// Run update task to refresh any online users
new UpdateTask(this).run();
runUpdateTask();
int mins = getConfiguration().getSyncTime();
if (mins > 0) {
long ticks = mins * 60 * 20;
new UpdateTask(this).runTaskTimer(this, ticks, ticks);
getServer().getScheduler().runTaskTimerAsynchronously(this, new UpdateTask(this), ticks, ticks);
}
// Provide vault support
@@ -111,6 +111,6 @@ public class LPBukkitPlugin extends JavaPlugin implements LuckPermsPlugin {
@Override
public void runUpdateTask() {
new UpdateTask(this).runTask(this);
getServer().getScheduler().runTaskAsynchronously(this, new UpdateTask(this));
}
}