mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-09 04:09:54 +01:00
Don't apply fall damage when cancelled. Fixes BUKKIT-4065
This commit is contained in:
parent
8590492680
commit
c3cf8a435b
@ -957,13 +957,15 @@ public abstract class EntityLiving extends Entity {
|
||||
// CraftBukkit start
|
||||
if (i > 0) {
|
||||
EntityDamageEvent event = CraftEventFactory.callEntityDamageEvent(null, this, EntityDamageEvent.DamageCause.FALL, i);
|
||||
if (!event.isCancelled()) {
|
||||
if (event.isCancelled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
i = event.getDamage();
|
||||
if (i > 0) {
|
||||
this.getBukkitEntity().setLastDamageCause(event);
|
||||
}
|
||||
}
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
if (i > 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user