Paper/nms-patches/EntityFireworks.patch

18 lines
628 B
Diff
Raw Normal View History

2015-09-30 01:02:11 +02:00
--- a/net/minecraft/server/EntityFireworks.java
+++ b/net/minecraft/server/EntityFireworks.java
2016-12-20 21:00:00 +01:00
@@ -117,8 +117,12 @@
2015-09-30 01:02:11 +02:00
}
if (!this.world.isClientSide && this.ticksFlown > this.expectedLifespan) {
- this.world.broadcastEntityEffect(this, (byte) 17);
2016-12-20 21:00:00 +01:00
- this.k();
+ // CraftBukkit start
+ if (!org.bukkit.craftbukkit.event.CraftEventFactory.callFireworkExplodeEvent(this).isCancelled()) {
+ this.world.broadcastEntityEffect(this, (byte) 17);
+ this.k();
+ }
+ // CraftBukkit end
2015-09-30 01:02:11 +02:00
this.die();
}