mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-26 04:05:28 +01:00
Fix logout npe
This commit is contained in:
parent
4de55d9efa
commit
f6791c35ec
@ -74,9 +74,7 @@ public class LogoutCommand implements CommandExecutor {
|
||||
AuthMeTeleportEvent tpEvent = new AuthMeTeleportEvent(player, spawnLoc);
|
||||
plugin.getServer().getPluginManager().callEvent(tpEvent);
|
||||
if(!tpEvent.isCancelled()) {
|
||||
if (!tpEvent.getTo().getWorld().getChunkAt(tpEvent.getTo()).isLoaded()) {
|
||||
tpEvent.getTo().getWorld().getChunkAt(tpEvent.getTo()).load();
|
||||
}
|
||||
if (tpEvent.getTo() != null)
|
||||
player.teleport(tpEvent.getTo());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user