Skip to content

Commit

Permalink
Cleanup ModifyDamageTakenPower
Browse files Browse the repository at this point in the history
  • Loading branch information
Dueris committed May 26, 2024
1 parent b5522d3 commit 1cd6dc8
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,8 @@ public void damageEVENT(EntityDamageEvent e) {
if (e.isCancelled()) return;
if (e.getEntity() instanceof Player p && getPlayers().contains(p)) {
try {
if (!isActive(p)) return;
if (e instanceof EntityDamageByEntityEvent ev) {
if (!ConditionExecutor.testBiEntity(bientityCondition, (CraftEntity) ev.getDamager(), (CraftEntity) p))
return;
}
if (!isActive(p) || e instanceof EntityDamageByEntityEvent ev && !ConditionExecutor.testBiEntity(bientityCondition, (CraftEntity) ev.getDamager(), (CraftEntity) p))
return;
if (!ConditionExecutor.testDamage(damageCondition, e)) return;
for (Modifier modifier : getModifiers()) {
float value = modifier.value();
Expand Down

0 comments on commit 1cd6dc8

Please sign in to comment.