SPIGOT-7225: FireworkMeta#getPower() can throw a NullPointerException for items with no power set

By: Parker Hawke <hawkeboyz2@hotmail.com>
This commit is contained in:
CraftBukkit/Spigot 2023-01-03 08:04:16 +11:00
parent 2d8592203b
commit 20992162c0

View file

@ -389,7 +389,7 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta {
@Override
public int getPower() {
return this.power;
return hasPower() ? this.power : 0;
}
@Override