Codestyle

This commit is contained in:
Auxilor 2021-12-26 13:26:33 +00:00
parent a75671027a
commit 31591de719
2 changed files with 2 additions and 5 deletions

View File

@ -2,5 +2,5 @@ group 'com.willfp'
version rootProject.version
dependencies {
compileOnly 'org.spigotmc:spigot:1.18-R0.1-SNAPSHOT'
compileOnly 'org.spigotmc:spigot:1.18.1-R0.1-SNAPSHOT'
}

View File

@ -447,10 +447,7 @@ public abstract class EcoEnchant extends Enchantment implements Listener, Watche
@Override
public boolean canEnchantItem(@NotNull final ItemStack itemStack) {
if (this.type.isSingular() && EcoEnchants.hasAnyOfType(itemStack, this.type)) {
if (FastItemStack.wrap(itemStack).getLevelOnItem(this, true) > 0) {
return true;
}
return false;
return FastItemStack.wrap(itemStack).getLevelOnItem(this, true) > 0;
}
if (itemStack.getType() == Material.BOOK || itemStack.getType() == Material.ENCHANTED_BOOK) {