Use Manager.canHurt instead of team equality
This commit is contained in:
parent
496d515972
commit
f41e9a4e2c
@ -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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user