expose more enchantment function to API & use them
Some checks are pending
Java CI with Gradle / build (push) Waiting to run

This commit is contained in:
alexcrea 2026-06-30 07:47:41 +02:00
parent 72a7860d93
commit 1e2acb6f48
Signed by: alexcrea
GPG key ID: E346CD16413450E3
6 changed files with 107 additions and 72 deletions

View file

@ -13,6 +13,7 @@ import org.bukkit.inventory.meta.Repairable;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.junit.jupiter.api.Assertions;
import xyz.alexcrea.cuanvil.api.EnchantmentApi;
import xyz.alexcrea.cuanvil.data.AnvilClickTestData;
import xyz.alexcrea.cuanvil.data.AnvilFuseTestData;
import xyz.alexcrea.cuanvil.enchant.CAEnchantment;
@ -47,7 +48,7 @@ public class AnvilFuseTestUtil {
}
ItemStack item = new ItemStack(material);
ItemUtil.INSTANCE.setEnchantmentsUnsafe(item, enchantmentMap);
EnchantmentApi.setEnchantments(item, enchantmentMap);
ItemMeta meta = item.getItemMeta();
((Repairable) meta).setRepairCost(repairCost);