3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-18 04:20:08 +01:00

Don't apply fall damage when cancelled. Fixes BUKKIT-4065

Dieser Commit ist enthalten in:
Travis Watkins 2013-04-13 01:03:08 -05:00
Ursprung 8590492680
Commit c3cf8a435b

Datei anzeigen

@ -957,11 +957,13 @@ public abstract class EntityLiving extends Entity {
// CraftBukkit start
if (i > 0) {
EntityDamageEvent event = CraftEventFactory.callEntityDamageEvent(null, this, EntityDamageEvent.DamageCause.FALL, i);
if (!event.isCancelled()) {
i = event.getDamage();
if (i > 0) {
this.getBukkitEntity().setLastDamageCause(event);
}
if (event.isCancelled()) {
return;
}
i = event.getDamage();
if (i > 0) {
this.getBukkitEntity().setLastDamageCause(event);
}
}
// CraftBukkit end