From 6e816175e1030d85d2e94e68627f148b2663b7ad Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Sat, 6 Jul 2019 10:08:52 +1000 Subject: [PATCH] SPIGOT-5142: Ignore invalid firework effects By: md_5 --- .../org/bukkit/craftbukkit/inventory/CraftMetaFirework.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java index 4c68273fc4..7a1c4d6199 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java @@ -90,7 +90,11 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta { List effects = this.effects = new ArrayList(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 + } } }