mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-02 21:17:00 +01:00
SPIGOT-5142: Ignore invalid firework effects
This commit is contained in:
parent
fca41573a3
commit
31d4a777c7
1 changed files with 5 additions and 1 deletions
|
@ -90,7 +90,11 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta {
|
|||
List<FireworkEffect> effects = this.effects = new ArrayList<FireworkEffect>(fireworkEffects.size());
|
||||
|
||||
for (int i = 0; i < fireworkEffects.size(); i++) {
|
||||
effects.add(getEffect((NBTTagCompound) fireworkEffects.get(i)));
|
||||
try {
|
||||
effects.add(getEffect((NBTTagCompound) fireworkEffects.get(i)));
|
||||
} catch (IllegalArgumentException ex) {
|
||||
// Ignore invalid effects
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue