13
0
geforkt von Mirrors/Paper

SPIGOT-5142: Ignore invalid firework effects

By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
CraftBukkit/Spigot 2019-07-06 10:08:52 +10:00
Ursprung 69da7cce55
Commit 6e816175e1

Datei anzeigen

@ -90,7 +90,11 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta {
List<FireworkEffect> effects = this.effects = new ArrayList<FireworkEffect>(fireworkEffects.size()); List<FireworkEffect> effects = this.effects = new ArrayList<FireworkEffect>(fireworkEffects.size());
for (int i = 0; i < fireworkEffects.size(); i++) { 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
}
} }
} }