Skip to content

Commit

Permalink
fix: migrate from potiondata to potiontype
Browse files Browse the repository at this point in the history
  • Loading branch information
darbyjack committed Jun 18, 2024
1 parent dd63249 commit cefa325
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 cefa325

Please sign in to comment.