From a939fbdf0b07cb8289d243d67e737a63eb773c43 Mon Sep 17 00:00:00 2001 From: Brokkonaut Date: Sun, 6 Sep 2020 18:13:21 +1000 Subject: [PATCH] SPIGOT-6123: Call EntityDamageEvent when a shulker bullet gets damaged --- nms-patches/EntityShulkerBullet.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/nms-patches/EntityShulkerBullet.patch b/nms-patches/EntityShulkerBullet.patch index 725f59b3e..798f84a05 100644 --- a/nms-patches/EntityShulkerBullet.patch +++ b/nms-patches/EntityShulkerBullet.patch @@ -31,3 +31,15 @@ } } +@@ -282,6 +295,11 @@ + + @Override + public boolean damageEntity(DamageSource damagesource, float f) { ++ // CraftBukkit start ++ if (org.bukkit.craftbukkit.event.CraftEventFactory.handleNonLivingEntityDamageEvent(this, damagesource, f, false)) { ++ return false; ++ } ++ // CraftBukkit end + if (!this.world.isClientSide) { + this.playSound(SoundEffects.ENTITY_SHULKER_BULLET_HURT, 1.0F, 1.0F); + ((WorldServer) this.world).a(Particles.CRIT, this.locX(), this.locY(), this.locZ(), 15, 0.2D, 0.2D, 0.2D, 0.0D);