Class PaperEnchantmentConverter
java.lang.Object
io.artificial.enchantments.internal.PaperEnchantmentConverter
Converts library EnchantmentDefinition instances to Paper's native
EnchantmentRegistryEntry.Builder format for registration during bootstrap.
This utility class bridges the library's enchantment definition format with Paper 1.21+'s native registry system. It handles conversion of properties like description, rarity, costs, supported items, and exclusive conflicts.
- Since:
- 0.2.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidconvertToBuilder(@NotNull EnchantmentDefinition definition, io.papermc.paper.registry.data.EnchantmentRegistryEntry.Builder builder, @NotNull io.papermc.paper.registry.event.RegistryComposeEvent<org.bukkit.enchantments.Enchantment, io.papermc.paper.registry.data.EnchantmentRegistryEntry.Builder> event) Configures a Paper EnchantmentRegistryEntry.Builder from an EnchantmentDefinition.
-
Method Details
-
convertToBuilder
public static void convertToBuilder(@NotNull @NotNull EnchantmentDefinition definition, @NotNull io.papermc.paper.registry.data.EnchantmentRegistryEntry.Builder builder, @NotNull @NotNull io.papermc.paper.registry.event.RegistryComposeEvent<org.bukkit.enchantments.Enchantment, io.papermc.paper.registry.data.EnchantmentRegistryEntry.Builder> event) Configures a Paper EnchantmentRegistryEntry.Builder from an EnchantmentDefinition.- Parameters:
definition- the library enchantment definitionbuilder- the Paper builder to configureevent- the registry compose event for tag lookups
-