Interface DatapackManager


@NullMarked public interface DatapackManager
  • Method Details

    • refreshPacks

      void refreshPacks()
      Triggers a refresh of the available and selected datapacks. This can find new datapacks, remove old ones, and update the metadata for existing datapacks. Some of these changes will only take effect after the next Server.reloadData() or /minecraft:reload.
    • getPack

      @Nullable Datapack getPack(String name)
      Gets a datapack by name. May require calling refreshPacks() before to get the latest pack information.
      Parameters:
      name - the name/id of the datapack
      Returns:
      the datapack, or null if not found
    • getPacks

      Gets the available datapacks. May require calling refreshPacks() before to get the latest pack information.
      Returns:
      all the packs known to the server
    • getEnabledPacks

      @Unmodifiable Collection<Datapack> getEnabledPacks()
      Gets the enabled datapacks. May require calling refreshPacks() before to get the latest pack information.
      Returns:
      all the packs which are currently enabled