From 84f1d558c343afcfc33c6150ed95b4537fd0b549 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Sat, 24 Aug 2024 07:44:52 +1000 Subject: [PATCH] #1465: Add FireworkMeta#hasPower By: Doc --- .../org/bukkit/craftbukkit/inventory/CraftMetaFirework.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 1d55be72b6..681aed86bb 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 @@ -218,7 +218,8 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta { return !(hasEffects() || hasPower()); } - boolean hasPower() { + @Override + public boolean hasPower() { return this.power != null; } @@ -340,7 +341,7 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta { @Override public int getPower() { - return hasPower() ? this.power : 1; + return hasPower() ? this.power : 0; } @Override