Merge pull request #229 from Sedri05/master

Fixed deflection harming player with enderpearl
This commit is contained in:
Will FP 2022-06-14 08:22:03 +01:00 committed by GitHub
commit 614ae61cac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,7 +27,9 @@ public class Deflection extends EcoEnchant {
if (attacker.hasMetadata("cleaved") || attacker.hasMetadata("carved")) {
return;
}
if (attacker.equals(blocker)){
return;
}
double perlevel = this.getConfig().getDouble(EcoEnchants.CONFIG_LOCATION + "percent-deflected-per-level");
double damagePercent = (perlevel / 100) * level;
double damage = event.getDamage() * damagePercent;