mirror of
https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git
synced 2025-07-04 21:53:53 +00:00
23 lines
951 B
Diff
23 lines
951 B
Diff
--- a/net/minecraft/world/item/ItemFireworks.java
|
|
+++ b/net/minecraft/world/item/ItemFireworks.java
|
|
@@ -17,6 +17,10 @@
|
|
import net.minecraft.world.level.World;
|
|
import net.minecraft.world.phys.Vec3D;
|
|
|
|
+// CraftBukkit start
|
|
+import org.bukkit.event.entity.EntityUnleashEvent;
|
|
+// CraftBukkit end
|
|
+
|
|
public class ItemFireworks extends Item implements ProjectileItem {
|
|
|
|
public static final byte[] CRAFTABLE_DURATIONS = new byte[]{1, 2, 3};
|
|
@@ -56,7 +60,7 @@
|
|
if (world instanceof WorldServer) {
|
|
WorldServer worldserver = (WorldServer) world;
|
|
|
|
- if (entityhuman.dropAllLeashConnections((EntityHuman) null)) {
|
|
+ if (entityhuman.dropAllLeashConnections((EntityHuman) null, EntityUnleashEvent.UnleashReason.FIREWORK)) { // CraftBukkit
|
|
world.playSound((Entity) null, (Entity) entityhuman, SoundEffects.LEAD_BREAK, SoundCategory.NEUTRAL, 1.0F, 1.0F);
|
|
}
|
|
|