geforkt von Mirrors/Paper
SPIGOT-5142: Ignore invalid firework effects
By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
Ursprung
69da7cce55
Commit
6e816175e1
@ -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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren