mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-24 17:22:55 +01:00
SPIGOT-5142: Ignore invalid firework effects
By: md_5 <git@md-5.net>
This commit is contained in:
parent
69da7cce55
commit
6e816175e1
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…
Add table
Reference in a new issue