mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-19 06:42:02 +01:00
SPIGOT-7789: Fix NPE in CraftMetaFirework applyToItem
By: blablubbabc <lukas@wirsindwir.de>
This commit is contained in:
parent
be0055d2a0
commit
2f1800fa2e
@ -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 New Issue
Block a user