Null checker
This commit is contained in:
parent
6145d9f87d
commit
56f19ec937
@ -153,7 +153,8 @@ public class CastleManager extends MiniPlugin
|
|||||||
UtilPlayer.message(oldKing.getKing(), F.main("Kingdom", "You are no longer the king of that castle!"));
|
UtilPlayer.message(oldKing.getKing(), F.main("Kingdom", "You are no longer the king of that castle!"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Bukkit.broadcastMessage(F.main("Kingdom", "" + F.name(newKing.getKing().getName()) + " is the new King of this lobby!"));
|
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);
|
setKing(newKing);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user