From 56f19ec9378476dad4c676012d3ceeeaf75aae7f Mon Sep 17 00:00:00 2001 From: LCastr0 Date: Wed, 26 Apr 2017 01:39:26 -0300 Subject: [PATCH] Null checker --- .../core/gadget/gadgets/particle/king/CastleManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/king/CastleManager.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/king/CastleManager.java index 6a8c4ec6c..d81419bcd 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/king/CastleManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/king/CastleManager.java @@ -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!")); } } - 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); }