summaryrefslogtreecommitdiffstats
path: root/nms-patches/EntityItemFrame.patch
blob: 1859a974a155fc3d9d48339b57ae1337b0f699be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--- a/net/minecraft/server/EntityItemFrame.java
+++ b/net/minecraft/server/EntityItemFrame.java
@@ -27,6 +27,11 @@
             return false;
         } else if (!damagesource.isExplosion() && this.getItem() != null) {
             if (!this.world.isClientSide) {
+                // 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);
             }