mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 04:05:50 -07:00
Fixed ender pearls ignoring damage cancellation
This commit is contained in:
@@ -42,7 +42,10 @@ public class EntityEnderPearl extends EntityProjectile {
|
||||
this.shooter.fallDistance = 0.0F;
|
||||
EntityDamageEvent event = new EntityDamageEvent(getBukkitEntity(), EntityDamageEvent.DamageCause.FALL, 5);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
this.shooter.damageEntity(DamageSource.FALL, event.getDamage());
|
||||
|
||||
if (!event.isCancelled()) {
|
||||
this.shooter.damageEntity(DamageSource.FALL, event.getDamage());
|
||||
}
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
|
Reference in New Issue
Block a user