Small cleanup

This commit is contained in:
Luck 2016-10-25 11:14:56 +01:00
parent a9b6493091
commit bd830617c9
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B
3 changed files with 3 additions and 6 deletions

View File

@ -125,11 +125,10 @@ public class LPBukkitPlugin extends JavaPlugin implements LuckPermsPlugin {
} }
// setup the update task buffer // setup the update task buffer
final LPBukkitPlugin i = this;
updateTaskBuffer = new BufferedRequest<Void>(1000L, this::doAsync) { updateTaskBuffer = new BufferedRequest<Void>(1000L, this::doAsync) {
@Override @Override
protected Void perform() { protected Void perform() {
getServer().getScheduler().runTaskAsynchronously(i, new UpdateTask(i)); doAsync(new UpdateTask(LPBukkitPlugin.this));
return null; return null;
} }
}; };

View File

@ -108,11 +108,10 @@ public class LPBungeePlugin extends Plugin implements LuckPermsPlugin {
} }
// setup the update task buffer // setup the update task buffer
final LPBungeePlugin i = this;
updateTaskBuffer = new BufferedRequest<Void>(1000L, this::doAsync) { updateTaskBuffer = new BufferedRequest<Void>(1000L, this::doAsync) {
@Override @Override
protected Void perform() { protected Void perform() {
doAsync(new UpdateTask(i)); doAsync(new UpdateTask(LPBungeePlugin.this));
return null; return null;
} }
}; };

View File

@ -148,11 +148,10 @@ public class LPSpongePlugin implements LuckPermsPlugin {
} }
// setup the update task buffer // setup the update task buffer
final LPSpongePlugin i = this;
updateTaskBuffer = new BufferedRequest<Void>(1000L, this::doAsync) { updateTaskBuffer = new BufferedRequest<Void>(1000L, this::doAsync) {
@Override @Override
protected Void perform() { protected Void perform() {
scheduler.createTaskBuilder().async().execute(new UpdateTask(i)).submit(i); doAsync(new UpdateTask(LPSpongePlugin.this));
return null; return null;
} }
}; };