From d9e659a61864b18469d0e06f3f8fc01a97e2d3e7 Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Wed, 29 May 2024 11:50:44 -0700 Subject: [PATCH] Allow firework effects with no colors (#10814) --- patches/api/0481-General-ItemMeta-fixes.patch | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 patches/api/0481-General-ItemMeta-fixes.patch diff --git a/patches/api/0481-General-ItemMeta-fixes.patch b/patches/api/0481-General-ItemMeta-fixes.patch new file mode 100644 index 0000000000..22f1db839c --- /dev/null +++ b/patches/api/0481-General-ItemMeta-fixes.patch @@ -0,0 +1,21 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jake Potrebic +Date: Tue, 28 May 2024 19:59:01 -0700 +Subject: [PATCH] General ItemMeta fixes + + +diff --git a/src/main/java/org/bukkit/FireworkEffect.java b/src/main/java/org/bukkit/FireworkEffect.java +index 637fa73d4366c2d88e2716e5c8d3465706d788a7..0f03c546ecdd6383fb36a362d18d6fb57f2ccfee 100644 +--- a/src/main/java/org/bukkit/FireworkEffect.java ++++ b/src/main/java/org/bukkit/FireworkEffect.java +@@ -322,9 +322,7 @@ public final class FireworkEffect implements ConfigurationSerializable { + private String string = null; + + FireworkEffect(boolean flicker, boolean trail, @NotNull ImmutableList colors, @NotNull ImmutableList fadeColors, @NotNull Type type) { +- if (colors.isEmpty()) { +- throw new IllegalStateException("Cannot make FireworkEffect without any color"); +- } ++ // Paper - can have empty colors + this.flicker = flicker; + this.trail = trail; + this.colors = colors;