MythicNetwork/MythicSpigot-master/TacoSpigot-Server/nms-patches/EntityFireworks.patch
2023-05-25 00:58:23 +01:00

12 lines
475 B
Diff

--- a/net/minecraft/server/EntityFireworks.java
+++ b/net/minecraft/server/EntityFireworks.java
@@ -78,7 +78,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);
this.die();
}