mirror of
https://github.com/PaperMC/Paper.git
synced 2026-11-25 10:29:41 -05:00
Don't apply fall damage when cancelled. Fixes BUKKIT-4065
This commit is contained in:
1 parent
8590492680
commit
c3cf8a435b
1 file changed
+7
-5
@@ -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
|
||||
|
||||
Reference in new issue
Block a user