diff --git a/spigot/build.gradle.kts b/spigot/build.gradle.kts index 9f79de71..028fb823 100644 --- a/spigot/build.gradle.kts +++ b/spigot/build.gradle.kts @@ -39,7 +39,7 @@ dependencies { implementation(project(":common")) // Spigot - compileOnly("org.spigotmc:spigot-api:1.20.2-R0.1-SNAPSHOT") + compileOnly("org.spigotmc:spigot-api:1.21-R0.1-SNAPSHOT") compileOnly("org.apache.commons:commons-lang3:3.13.0") // bStats diff --git a/spigot/src/main/java/de/sean/blockprot/bukkit/inventories/BlockProtInventory.java b/spigot/src/main/java/de/sean/blockprot/bukkit/inventories/BlockProtInventory.java index dfd40dff..18ef2ac3 100644 --- a/spigot/src/main/java/de/sean/blockprot/bukkit/inventories/BlockProtInventory.java +++ b/spigot/src/main/java/de/sean/blockprot/bukkit/inventories/BlockProtInventory.java @@ -573,9 +573,9 @@ protected ItemStack toggleEnchants(@NotNull ItemStack stack, final @Nullable Boo } if (meta != null) { if (meta.hasEnchants() && (toggle == null || !toggle)) { - meta.removeEnchant(Enchantment.ARROW_INFINITE); + meta.removeEnchant(Enchantment.INFINITY); } else if (!meta.hasEnchants() && (toggle == null || toggle)) { - meta.addEnchant(Enchantment.ARROW_INFINITE, 1, true); + meta.addEnchant(Enchantment.INFINITY, 1, true); } meta.addItemFlags(ItemFlag.HIDE_ENCHANTS); stack.setItemMeta(meta); @@ -644,10 +644,10 @@ protected ItemStack toggleOption(@NotNull ItemStack stack, final @Nullable Boole } if (meta.hasEnchants() && (toggle == null || !toggle)) { - meta.removeEnchant(Enchantment.ARROW_INFINITE); + meta.removeEnchant(Enchantment.INFINITY); meta.setDisplayName(name + ": " + Translator.get(TranslationKey.DISABLED)); } else if (!meta.hasEnchants() && (toggle == null || toggle)) { - meta.addEnchant(Enchantment.ARROW_INFINITE, 1, true); + meta.addEnchant(Enchantment.INFINITY, 1, true); meta.setDisplayName(name + ": " + Translator.get(TranslationKey.ENABLED)); } meta.addItemFlags(ItemFlag.HIDE_ENCHANTS);