Null checker

This commit is contained in:
LCastr0 2017-04-26 01:39:26 -03:00
parent 6145d9f87d
commit 56f19ec937
1 changed files with 2 additions and 1 deletions

View File

@ -153,6 +153,7 @@ public class CastleManager extends MiniPlugin
UtilPlayer.message(oldKing.getKing(), F.main("Kingdom", "You are no longer the king of that castle!"));
}
}
if (newKing != null && newKing.getKing().isOnline())
Bukkit.broadcastMessage(F.main("Kingdom", "" + F.name(newKing.getKing().getName()) + " is the new King of this lobby!"));
setKing(newKing);
}