Added MC 1.21 support

This commit is contained in:
Intelli 2024-06-17 17:30:18 -06:00
parent 371e496351
commit 37fc9af300
6 changed files with 33 additions and 18 deletions

View file

@ -271,7 +271,7 @@ public class BukkitAdapter implements BukkitInterface {
@Override
public ItemStack getArrowMeta(Arrow arrow, ItemStack itemStack) {
PotionData data = arrow.getBasePotionData();
if (data.getType() != PotionType.UNCRAFTABLE) {
if (data.getType() != PotionType.valueOf("UNCRAFTABLE")) {
itemStack = new ItemStack(Material.TIPPED_ARROW);
PotionMeta meta = (PotionMeta) itemStack.getItemMeta();
meta.setBasePotionData(data);