This commit is contained in:
Luck 2016-08-20 16:29:59 +01:00
parent 6fc00976a0
commit 471084a9ef
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B
3 changed files with 24 additions and 24 deletions

View File

@ -92,14 +92,6 @@ public class LPBukkitPlugin extends JavaPlugin implements LuckPermsPlugin {
trackManager = new TrackManager(); trackManager = new TrackManager();
importer = new Importer(commandManager); importer = new Importer(commandManager);
// Run update task to refresh any online users
getLog().info("Scheduling Update Task to refresh any online users.");
try {
new UpdateTask(this).run();
} catch (Exception e) {
e.printStackTrace();
}
int mins = getConfiguration().getSyncTime(); int mins = getConfiguration().getSyncTime();
if (mins > 0) { if (mins > 0) {
long ticks = mins * 60 * 20; long ticks = mins * 60 * 20;
@ -128,6 +120,14 @@ public class LPBukkitPlugin extends JavaPlugin implements LuckPermsPlugin {
LuckPerms.registerProvider(apiProvider); LuckPerms.registerProvider(apiProvider);
getServer().getServicesManager().register(LuckPermsApi.class, apiProvider, this, ServicePriority.Normal); getServer().getServicesManager().register(LuckPermsApi.class, apiProvider, this, ServicePriority.Normal);
// Run update task to refresh any online users
getLog().info("Scheduling Update Task to refresh any online users.");
try {
new UpdateTask(this).run();
} catch (Exception e) {
e.printStackTrace();
}
getLog().info("Successfully loaded."); getLog().info("Successfully loaded.");
} }

View File

@ -88,14 +88,6 @@ public class LPBungeePlugin extends Plugin implements LuckPermsPlugin {
trackManager = new TrackManager(); trackManager = new TrackManager();
importer = new Importer(commandManager); importer = new Importer(commandManager);
// Run update task to refresh any online users
getLog().info("Scheduling Update Task to refresh any online users.");
try {
new UpdateTask(this).run();
} catch (Exception e) {
e.printStackTrace();
}
int mins = getConfiguration().getSyncTime(); int mins = getConfiguration().getSyncTime();
if (mins > 0) { if (mins > 0) {
getProxy().getScheduler().schedule(this, new UpdateTask(this), mins, mins, TimeUnit.MINUTES); getProxy().getScheduler().schedule(this, new UpdateTask(this), mins, mins, TimeUnit.MINUTES);
@ -109,6 +101,14 @@ public class LPBungeePlugin extends Plugin implements LuckPermsPlugin {
apiProvider = new ApiProvider(this); apiProvider = new ApiProvider(this);
LuckPerms.registerProvider(apiProvider); LuckPerms.registerProvider(apiProvider);
// Run update task to refresh any online users
getLog().info("Scheduling Update Task to refresh any online users.");
try {
new UpdateTask(this).run();
} catch (Exception e) {
e.printStackTrace();
}
getLog().info("Successfully loaded."); getLog().info("Successfully loaded.");
} }

View File

@ -115,14 +115,6 @@ public class LPSpongePlugin implements LuckPermsPlugin {
trackManager = new TrackManager(); trackManager = new TrackManager();
importer = new Importer(commandManager); importer = new Importer(commandManager);
// Run update task to refresh any online users
getLog().info("Scheduling Update Task to refresh any online users.");
try {
new UpdateTask(this).run();
} catch (Exception e) {
e.printStackTrace();
}
int mins = getConfiguration().getSyncTime(); int mins = getConfiguration().getSyncTime();
if (mins > 0) { if (mins > 0) {
scheduler.createTaskBuilder().async().interval(mins, TimeUnit.MINUTES).execute(new UpdateTask(this)) scheduler.createTaskBuilder().async().interval(mins, TimeUnit.MINUTES).execute(new UpdateTask(this))
@ -137,6 +129,14 @@ public class LPSpongePlugin implements LuckPermsPlugin {
LuckPerms.registerProvider(apiProvider); LuckPerms.registerProvider(apiProvider);
Sponge.getServiceManager().setProvider(this, LuckPermsApi.class, apiProvider); Sponge.getServiceManager().setProvider(this, LuckPermsApi.class, apiProvider);
// Run update task to refresh any online users
getLog().info("Scheduling Update Task to refresh any online users.");
try {
new UpdateTask(this).run();
} catch (Exception e) {
e.printStackTrace();
}
getLog().info("Successfully loaded."); getLog().info("Successfully loaded.");
} }