fix nullpointer spawn
This commit is contained in:
parent
b1fb09b753
commit
87570b4061
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user