Fix login NPE when async tasks run after the event has been fully handled

This commit is contained in:
Luck 2017-01-23 16:22:11 +00:00
parent d93cc826b2
commit 7d1a3d32e9
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B

View File

@ -136,7 +136,7 @@ class BukkitListener extends AbstractListener implements Listener {
} }
// The player got denied on sync login. // The player got denied on sync login.
onLeave(e.getPlayer().getUniqueId()); plugin.getServer().getScheduler().runTaskLater(plugin, () -> onLeave(e.getPlayer().getUniqueId()), 20L);
} else { } else {
plugin.refreshAutoOp(e.getPlayer()); plugin.refreshAutoOp(e.getPlayer());
} }