Class PaperEnchantmentBootstrap

java.lang.Object
io.artificial.enchantments.internal.PaperEnchantmentBootstrap
All Implemented Interfaces:
io.papermc.paper.plugin.bootstrap.PluginBootstrap

public class PaperEnchantmentBootstrap extends Object implements io.papermc.paper.plugin.bootstrap.PluginBootstrap
Paper 1.21+ PluginBootstrap implementation for registering custom enchantments via the native registry system during the bootstrap phase.

This bootstrap handles RegistryEvents.ENCHANTMENT.compose() to convert library EnchantmentDefinitions into native Paper enchantment registry entries.

Requires load: STARTUP in plugin.yml.

  • Constructor Details

    • PaperEnchantmentBootstrap

      public PaperEnchantmentBootstrap()
      Creates a new Paper enchantment bootstrap.
      Since:
      0.2.0
  • Method Details

    • bootstrap

      public void bootstrap(@NotNull @NotNull io.papermc.paper.plugin.bootstrap.BootstrapContext context)
      Specified by:
      bootstrap in interface io.papermc.paper.plugin.bootstrap.PluginBootstrap
    • createPlugin

      @NotNull public @NotNull org.bukkit.plugin.java.JavaPlugin createPlugin(@NotNull @NotNull io.papermc.paper.plugin.bootstrap.PluginProviderContext context)
      Specified by:
      createPlugin in interface io.papermc.paper.plugin.bootstrap.PluginBootstrap