fix nullpointer spawn

This commit is contained in:
Webadmin 2021-07-07 15:50:37 +02:00
parent b1fb09b753
commit 87570b4061

View File

@ -59,8 +59,10 @@ public class Example extends JavaPlugin implements Listener, CommandExecutor {
}
// teleport player in a few seconds to spawn
UltimateKingdom.getKingdomServer().TeleportManager().TelePortPlayer(player.getPlayer(), player.getKingdom().getSpawn(),
if (player.getKingdom() != null ) {
UltimateKingdom.getKingdomServer().TeleportManager().TelePortPlayer(player.getPlayer(), player.getKingdom().getSpawn(),
"Kingdom Spawn");
}
}