mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-02 09:21:57 +01:00
SPIGOT-7789: Fix NPE in CraftMetaFirework applyToItem
By: blablubbabc <lukas@wirsindwir.de>
This commit is contained in:
parent
be0055d2a0
commit
2f1800fa2e
1 changed files with 4 additions and 2 deletions
|
@ -185,8 +185,10 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta {
|
|||
}
|
||||
|
||||
List<FireworkExplosion> effects = new ArrayList<>();
|
||||
for (FireworkEffect effect : this.effects) {
|
||||
effects.add(getExplosion(effect));
|
||||
if (hasEffects()) {
|
||||
for (FireworkEffect effect : this.effects) {
|
||||
effects.add(getExplosion(effect));
|
||||
}
|
||||
}
|
||||
|
||||
itemTag.put(FIREWORKS, new Fireworks(power, effects));
|
||||
|
|
Loading…
Reference in a new issue