Fixed NPE for Gladiators death event

This commit is contained in:
xGamingDudex 2016-02-16 18:54:13 +01:00
parent 2436b7084a
commit 2f302f4892

View File

@ -1078,7 +1078,7 @@ public class Gladiators extends SoloGame
if (!(e.GetEvent().getEntity() instanceof Player))
return;
if (e.GetLog().GetKiller().IsPlayer())
if (e.GetLog().GetKilledColor() != null && e.GetLog().GetKiller().IsPlayer())
{
Player killer = UtilPlayer.searchExact(e.GetLog().GetKiller().GetName());
((Player)e.GetEvent().getEntity()).sendMessage(F.main("Game", "Your killer had " + C.cRed + (new DecimalFormat("#.#").format((killer.getHealth() / 2))) + "" + C.cGray + " left."));