Skip to content

Commit

Permalink
Update spigot-api to 1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
Swanty committed Jul 21, 2024
1 parent 4c52f2b commit 507ed6c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion spigot/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 507ed6c

Please sign in to comment.