3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 12:30:06 +01:00

SPIGOT-5142: Ignore invalid firework effects

Dieser Commit ist enthalten in:
md_5 2019-07-06 10:08:52 +10:00
Ursprung fca41573a3
Commit 31d4a777c7

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++) {
try {
effects.add(getEffect((NBTTagCompound) fireworkEffects.get(i))); effects.add(getEffect((NBTTagCompound) fireworkEffects.get(i)));
} catch (IllegalArgumentException ex) {
// Ignore invalid effects
}
} }
} }