Make refresh calls in SpongeListener run async

This commit is contained in:
Luck 2016-10-09 20:49:17 +01:00
parent 93c7c06b2d
commit 1eb053447e
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B

View File

@ -66,13 +66,13 @@ public class SpongeListener extends AbstractListener {
} }
// Refresh permissions again // Refresh permissions again
user.refreshPermissions(); plugin.doAsync(user::refreshPermissions);
} }
@Listener @Listener
public void onClientJoin(ClientConnectionEvent.Join e) { public void onClientJoin(ClientConnectionEvent.Join e) {
// Refresh permissions again // Refresh permissions again
refreshPlayer(e.getTargetEntity().getUniqueId()); plugin.doAsync(() -> refreshPlayer(e.getTargetEntity().getUniqueId()));
} }
@Listener @Listener