Fix NPE
This commit is contained in:
@@ -115,14 +115,6 @@ public class LPSpongePlugin implements LuckPermsPlugin {
|
||||
trackManager = new TrackManager();
|
||||
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();
|
||||
if (mins > 0) {
|
||||
scheduler.createTaskBuilder().async().interval(mins, TimeUnit.MINUTES).execute(new UpdateTask(this))
|
||||
@@ -137,6 +129,14 @@ public class LPSpongePlugin implements LuckPermsPlugin {
|
||||
LuckPerms.registerProvider(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.");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user