mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 11:24:11 +01:00
Fixed ender pearls ignoring damage cancellation
This commit is contained in:
parent
0c958c0dff
commit
9fe5529791
1 changed files with 4 additions and 1 deletions
|
@ -42,8 +42,11 @@ public class EntityEnderPearl extends EntityProjectile {
|
||||||
this.shooter.fallDistance = 0.0F;
|
this.shooter.fallDistance = 0.0F;
|
||||||
EntityDamageEvent event = new EntityDamageEvent(getBukkitEntity(), EntityDamageEvent.DamageCause.FALL, 5);
|
EntityDamageEvent event = new EntityDamageEvent(getBukkitEntity(), EntityDamageEvent.DamageCause.FALL, 5);
|
||||||
Bukkit.getPluginManager().callEvent(event);
|
Bukkit.getPluginManager().callEvent(event);
|
||||||
|
|
||||||
|
if (!event.isCancelled()) {
|
||||||
this.shooter.damageEntity(DamageSource.FALL, event.getDamage());
|
this.shooter.damageEntity(DamageSource.FALL, event.getDamage());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
this.die();
|
this.die();
|
||||||
|
|
Loading…
Reference in a new issue