Skip to content

Commit

Permalink
Merge pull request #104 from HelpChat/fix/potion-data
Browse files Browse the repository at this point in the history
  • Loading branch information
darbyjack authored Jun 18, 2024
2 parents dd63249 + cefa325 commit 253cff7
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ArmorMeta;
import org.bukkit.inventory.meta.PotionMeta;
import org.bukkit.potion.PotionData;
import org.bukkit.potion.PotionType;
import org.jetbrains.annotations.NotNull;

Expand Down Expand Up @@ -93,8 +92,7 @@ public static boolean hasPotionMeta(@NotNull final ItemStack itemStack) {
final PotionMeta itemMeta = (PotionMeta) itemStack.getItemMeta();

if (itemMeta != null) {
final PotionData potionData = new PotionData(PotionType.WATER);
itemMeta.setBasePotionData(potionData);
itemMeta.setBasePotionType(PotionType.WATER);
itemStack.setItemMeta(itemMeta);
}

Expand Down

0 comments on commit 253cff7

Please sign in to comment.