Use Manager.canHurt instead of team equality

This commit is contained in:
Spencer 2017-12-28 18:38:58 -05:00 committed by Alexander Meech
parent 496d515972
commit f41e9a4e2c

View File

@ -169,11 +169,7 @@ public class PerkSkeletons extends Perk
event.setCancelled(true);
}
if (event.getTarget() instanceof Player)
{
Player target = (Player) event.getTarget();
if (Manager.GetGame().GetTeam(player) == Manager.GetGame().GetTeam(target))
if (!Manager.canHurt(player, (Player) event.getTarget()))
{
event.setCancelled(true);
}
@ -181,7 +177,6 @@ public class PerkSkeletons extends Perk
}
}
}
}
@EventHandler
public void MinionUpdate(UpdateEvent event)