From ae65645abf41da7517501cdca3ca555725859330 Mon Sep 17 00:00:00 2001 From: Daniel V Date: Fri, 14 Jun 2024 10:11:23 -0400 Subject: [PATCH] Apply fix for potion meta. --- .../main/java/net/tnemc/item/bukkit/data/BukkitPotionData.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Bukkit/src/main/java/net/tnemc/item/bukkit/data/BukkitPotionData.java b/Bukkit/src/main/java/net/tnemc/item/bukkit/data/BukkitPotionData.java index 8c95307..a31e811 100644 --- a/Bukkit/src/main/java/net/tnemc/item/bukkit/data/BukkitPotionData.java +++ b/Bukkit/src/main/java/net/tnemc/item/bukkit/data/BukkitPotionData.java @@ -44,9 +44,10 @@ public class BukkitPotionData extends SerialPotionData { public void of(ItemStack stack) { final PotionMeta meta = (PotionMeta)stack.getItemMeta(); - if(meta != null) { + if(meta != null && meta.getBasePotionData() != null) { if(meta.hasColor()) colorRGB = meta.getColor().asRGB(); + type = meta.getBasePotionData().getType().name(); extended = meta.getBasePotionData().isExtended(); upgraded = meta.getBasePotionData().isUpgraded();