mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-12-01 22:54:00 +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);
|
AuthMeTeleportEvent tpEvent = new AuthMeTeleportEvent(player, spawnLoc);
|
||||||
plugin.getServer().getPluginManager().callEvent(tpEvent);
|
plugin.getServer().getPluginManager().callEvent(tpEvent);
|
||||||
if(!tpEvent.isCancelled()) {
|
if(!tpEvent.isCancelled()) {
|
||||||
if (!tpEvent.getTo().getWorld().getChunkAt(tpEvent.getTo()).isLoaded()) {
|
if (tpEvent.getTo() != null)
|
||||||
tpEvent.getTo().getWorld().getChunkAt(tpEvent.getTo()).load();
|
|
||||||
}
|
|
||||||
player.teleport(tpEvent.getTo());
|
player.teleport(tpEvent.getTo());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user