fix nullpointer spawn

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

View File

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