mirror of
https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git
synced 2025-08-05 16:49:30 +00:00
SPIGOT-7789: Fix NPE in CraftMetaFirework applyToItem
This commit is contained in:
parent
2889b3a11e
commit
ee3d7258a5
1 changed files with 4 additions and 2 deletions
|
@ -185,8 +185,10 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta {
|
||||||
}
|
}
|
||||||
|
|
||||||
List<FireworkExplosion> effects = new ArrayList<>();
|
List<FireworkExplosion> effects = new ArrayList<>();
|
||||||
for (FireworkEffect effect : this.effects) {
|
if (hasEffects()) {
|
||||||
effects.add(getExplosion(effect));
|
for (FireworkEffect effect : this.effects) {
|
||||||
|
effects.add(getExplosion(effect));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
itemTag.put(FIREWORKS, new Fireworks(power, effects));
|
itemTag.put(FIREWORKS, new Fireworks(power, effects));
|
||||||
|
|
Loading…
Add table
Reference in a new issue