mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-05 18:27:17 +01:00
[Bleeding] Ignore damage done by LivingEntity.damage(). Fixes BUKKIT-5666
This matches behavior previous to new damage event API of not throwing events for plugin-triggered damage. By: t00thpick1 <t00thpick1dirko@gmail.com>
This commit is contained in:
parent
50c4b76dfa
commit
de522b136d
1 changed files with 2 additions and 0 deletions
|
@ -511,6 +511,8 @@ public class CraftEventFactory {
|
|||
cause = DamageCause.MAGIC;
|
||||
} else if (source == DamageSource.FALL) {
|
||||
cause = DamageCause.FALL;
|
||||
} else if (source == DamageSource.GENERIC) {
|
||||
return new EntityDamageEvent(entity.getBukkitEntity(), null, modifiers);
|
||||
}
|
||||
|
||||
if (cause != null) {
|
||||
|
|
Loading…
Reference in a new issue