PaperMC/nms-patches/EntityItemFrame.patch

14 lines
603 B
Diff
Raw Normal View History

@@ -27,6 +27,12 @@
return false;
} else if (!damagesource.isExplosion() && this.getItem() != null) {
if (!this.world.isStatic) {
+ // CraftBukkit start - fire EntityDamageEvent
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.handleNonLivingEntityDamageEvent(this, damagesource, f, false) || this.dead) {
+ return true;
+ }
+ // CraftBukkit end
+
this.a(damagesource.getEntity(), false);
this.setItem((ItemStack) null);
}