diff --git a/patches/server/Return-0-by-default-for-FireworkMeta.patch b/patches/server/Return-0-by-default-for-FireworkMeta.patch new file mode 100644 index 0000000000..7a69764231 --- /dev/null +++ b/patches/server/Return-0-by-default-for-FireworkMeta.patch @@ -0,0 +1,19 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Owen1212055 <23108066+Owen1212055@users.noreply.github.com> +Date: Thu, 29 Dec 2022 11:16:05 -0500 +Subject: [PATCH] Return 0 by default for FireworkMeta + + +diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java ++++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java +@@ -0,0 +0,0 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta { + + @Override + public int getPower() { +- return this.power; ++ return java.util.Objects.requireNonNullElse(this.power, 0); // Paper + } + + @Override