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,14 +169,9 @@ public class PerkSkeletons extends Perk
event.setCancelled(true); event.setCancelled(true);
} }
if (event.getTarget() instanceof Player) if (!Manager.canHurt(player, (Player) event.getTarget()))
{ {
Player target = (Player) event.getTarget(); event.setCancelled(true);
if (Manager.GetGame().GetTeam(player) == Manager.GetGame().GetTeam(target))
{
event.setCancelled(true);
}
} }
} }
} }