Fix minor skywars error

This commit is contained in:
libraryaddict 2015-10-24 13:32:55 +13:00
parent 4d2b359aad
commit e3c824c512

View File

@ -774,7 +774,7 @@ public abstract class Skywars extends Game
@EventHandler
public void zombieTarget(EntityTargetLivingEntityEvent event)
{
if (event.getEntity() instanceof Zombie && _zombies.containsKey((Zombie)event.getEntity()))
if (event.getTarget() != null && event.getEntity() instanceof Zombie && _zombies.containsKey((Zombie)event.getEntity()))
{
Zombie zombie = (Zombie)event.getEntity();
Location loc = _zombies.get(zombie);