Skip to content

Commit

Permalink
[ci skip] Fix incomplete example in javadocs for PostFlattenTagRegist…
Browse files Browse the repository at this point in the history
…rar (#12103)
  • Loading branch information
Doc94 authored Feb 12, 2025
1 parent db2aa18 commit cf7c6c7
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,16 @@
* <pre>{@code
* class YourBootstrapClass implements PluginBootstrap {
*
* public static final TypedKey<Enchantment> CUSTOM_POINTY_ENCHANT = EnchantmentKeys.create(Key.key("papermc:pointy"));
*
* @Override
* public void bootstrap(BootstrapContext context) {
* LifecycleEventManager<BootstrapContext> manager = context.getLifecycleManager();
* manager.registerEventHandler(LifecycleEvents.TAGS.postFlatten(RegistryKey.ENCHANTMENT), event -> {
* final PostFlattenTagRegistrar<Enchantment> registrar = event.registrar();
* registrar.addToTag(
* EnchantmentTagKeys.IN_ENCHANTING_TABLE,
* Set.of(CUSTOM_ENCHANT)
* Set.of(CUSTOM_POINTY_ENCHANT)
* );
* });
* }
Expand Down

0 comments on commit cf7c6c7

Please sign in to comment.