mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-29 19:52:55 +01:00
14 lines
603 B
Diff
14 lines
603 B
Diff
|
@@ -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);
|
||
|
}
|