Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-17 05:20:05 +01:00
Fixed ender pearls ignoring damage cancellation
Dieser Commit ist enthalten in:
Ursprung
0c958c0dff
Commit
9fe5529791
@ -42,7 +42,10 @@ 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);
|
||||||
this.shooter.damageEntity(DamageSource.FALL, event.getDamage());
|
|
||||||
|
if (!event.isCancelled()) {
|
||||||
|
this.shooter.damageEntity(DamageSource.FALL, event.getDamage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren