geforkt von Mirrors/Paper
Return 0 if null for FireworkMeta (#8738)
Dieser Commit ist enthalten in:
Ursprung
90750a6591
Commit
8d7d92709d
19
patches/server/0957-Return-0-by-default-for-FireworkMeta.patch
Normale Datei
19
patches/server/0957-Return-0-by-default-for-FireworkMeta.patch
Normale Datei
@ -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 907b016d3d7b4c756fa0ca75fb92d86b2e9bde1c..66e8863c0e60771719b8cf4f54a4e362943d7a42 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java
|
||||
@@ -389,7 +389,7 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta {
|
||||
|
||||
@Override
|
||||
public int getPower() {
|
||||
- return this.power;
|
||||
+ return java.util.Objects.requireNonNullElse(this.power, 0); // Paper
|
||||
}
|
||||
|
||||
@Override
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren