summaryrefslogtreecommitdiffstats
path: root/nms-patches/EntityFireworks.patch
blob: 7d26d6561de4ac3bd23ef6fb2e45cda7728a5aef (plain)
1
2
3
4
5
6
7
8
9
10
11
--- a/net/minecraft/server/EntityFireworks.java
+++ b/net/minecraft/server/EntityFireworks.java
@@ -80,7 +80,7 @@
         }
 
         if (!this.world.isClientSide && this.ticksFlown > this.expectedLifespan) {
-            this.world.broadcastEntityEffect(this, (byte) 17);
+            if (!org.bukkit.craftbukkit.event.CraftEventFactory.callFireworkExplodeEvent(this).isCancelled()) this.world.broadcastEntityEffect(this, (byte) 17); // CraftBukkit
             this.die();
         }