mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-06 18:50:51 +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,9 +185,11 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta {
|
||||||
}
|
}
|
||||||
|
|
||||||
List<FireworkExplosion> effects = new ArrayList<>();
|
List<FireworkExplosion> effects = new ArrayList<>();
|
||||||
|
if (hasEffects()) {
|
||||||
for (FireworkEffect effect : this.effects) {
|
for (FireworkEffect effect : this.effects) {
|
||||||
effects.add(getExplosion(effect));
|
effects.add(getExplosion(effect));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
itemTag.put(FIREWORKS, new Fireworks(power, effects));
|
itemTag.put(FIREWORKS, new Fireworks(power, effects));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue