mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-27 15:00:13 +01:00
SPIGOT-6123: Call EntityDamageEvent when a shulker bullet gets damaged
This commit is contained in:
parent
a05df28a78
commit
a939fbdf0b
1 changed files with 12 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue