diff --git a/pom.xml b/pom.xml index 8a52c6a6..a4b22b00 100644 --- a/pom.xml +++ b/pom.xml @@ -115,7 +115,7 @@ org.spigotmc spigot-api - 1.20.1-R0.1-SNAPSHOT + 1.21-R0.1-SNAPSHOT provided @@ -127,7 +127,7 @@ com.mojang authlib - 1.5.21 + 1.5.25 provided @@ -161,7 +161,7 @@ de.tr7zw item-nbt-api - 2.11.3 + 2.13.1 com.github.shynixn.headdatabase diff --git a/src/main/java/fun/lewisdev/deluxehub/utility/ItemStackBuilder.java b/src/main/java/fun/lewisdev/deluxehub/utility/ItemStackBuilder.java index bc8bd2d0..ecacf9b5 100644 --- a/src/main/java/fun/lewisdev/deluxehub/utility/ItemStackBuilder.java +++ b/src/main/java/fun/lewisdev/deluxehub/utility/ItemStackBuilder.java @@ -5,6 +5,8 @@ import fun.lewisdev.deluxehub.utility.universal.XMaterial; import org.bukkit.Color; import org.bukkit.Material; +import org.bukkit.NamespacedKey; +import org.bukkit.Registry; import org.bukkit.configuration.ConfigurationSection; import org.bukkit.enchantments.Enchantment; import org.bukkit.entity.Player; @@ -177,7 +179,11 @@ public ItemStackBuilder withGlow() { final ItemMeta meta = ITEM_STACK.getItemMeta(); meta.addItemFlags(ItemFlag.HIDE_ENCHANTS); ITEM_STACK.setItemMeta(meta); - ITEM_STACK.addUnsafeEnchantment(Enchantment.ARROW_INFINITE, 1); + Enchantment infinity = Registry.ENCHANTMENT.get(NamespacedKey.minecraft("infinity")); + if (infinity == null) { + throw new NullPointerException("infinity enchantment"); + } + ITEM_STACK.addUnsafeEnchantment(infinity, 1); return this; }