allow enchanted book for super enchant

This commit is contained in:
alexcrea 2026-06-22 03:11:46 +02:00
parent 37e8ca7da9
commit eb2e7b3abb
Signed by: alexcrea
GPG key ID: E346CD16413450E3
2 changed files with 4 additions and 1 deletions

View file

@ -22,7 +22,7 @@ plugins {
}
group = "xyz.alexcrea"
version = "1.17.4"
version = "1.17.5"
val isDevBuild = System.getenv("SMALL_COMMIT_HASH") != null
val isPreRelease = System.getenv("IS_GITHUB_PRERELEASE") == "true"

View file

@ -5,6 +5,7 @@ import com.maddoxh.superEnchants.enchants.EnchantManager;
import com.maddoxh.superEnchants.items.EnchantApplicator;
import com.maddoxh.superEnchants.items.EnchantReader;
import com.maddoxh.superEnchants.util.ConflictChecker;
import org.bukkit.Material;
import org.bukkit.NamespacedKey;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
@ -68,6 +69,8 @@ public class CASuperEnchantEnchantment extends CAEnchantmentBase implements Addi
@Override
public boolean isItemConflict(@NotNull Map<CAEnchantment, Integer> enchantments, @NotNull NamespacedKey itemType, @NotNull ItemStack item) {
if(Material.ENCHANTED_BOOK.equals(item.getType())) return false;
return !enchant.canApplyTo(item.getType());
}
}