SPIGOT-7789: Fix NPE in CraftMetaFirework applyToItem
This commit is contained in:
parent
2889b3a11e
commit
ee3d7258a5
@ -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…
x
Reference in New Issue
Block a user