Use Manager.canHurt instead of team equality
This commit is contained in:
parent
496d515972
commit
f41e9a4e2c
@ -169,11 +169,7 @@ 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();
|
|
||||||
|
|
||||||
if (Manager.GetGame().GetTeam(player) == Manager.GetGame().GetTeam(target))
|
|
||||||
{
|
{
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
@ -181,7 +177,6 @@ public class PerkSkeletons extends Perk
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void MinionUpdate(UpdateEvent event)
|
public void MinionUpdate(UpdateEvent event)
|
||||||
|
Loading…
Reference in New Issue
Block a user