Interface DatapackChannel

All Known Implementing Classes:
ModuleContributions

@Experimental @NonExtendable public interface DatapackChannel
Declarations of data packs bundled in a module JAR. Experimental: these channels use Paper's bootstrap lifecycle and RegistryEvents.ENCHANTMENT. Paper 26.3 marks PluginBootstrap, LifecycleEvents.TAGS, LifecycleEvents.DATAPACK_DISCOVERY and io.papermc.paper.registry.tag.Tag experimental. A later 7.x release may adapt this interface to Paper changes; see COMPATIBILITY.md.
Since:
7.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Declares the bundled data pack at datapacks/<name>/ in this module's JAR.
  • Method Details

    • embedded

      void embedded(String name)
      Declares the bundled data pack at datapacks/<name>/ in this module's JAR. Data packs that add world-generation data are refused: the module will not load, even if it catches the exception from this method.
      Parameters:
      name - lower-case [a-z0-9_-]{1,32}; the server lists it as UltiTools/<namespace>.<name>
      Throws:
      IllegalArgumentException - if the name is invalid, declared twice, or the directory or its pack.mcmeta is missing or invalid, or the pack adds world-generation data
      IllegalStateException - if called after bootstrap() returned