Interface DiscoveredDatapack

All Known Subinterfaces:
Datapack

@NullMarked @NonExtendable public interface DiscoveredDatapack
Represents a snapshot of a datapack that the server has found by searching available sources. It may or may not be enabled and isn't guaranteed to be available. This object won't be updated as datapacks are updated.
See Also:
  • Method Details

    • getName

      @Contract(pure=true) String getName()
      Gets the name/id of this datapack.
      Returns:
      the name of the pack
    • getTitle

      Component getTitle()
      Gets the title component of this datapack.
      Returns:
      the title
    • getDescription

      Component getDescription()
      Gets the description component of this datapack.
      Returns:
      the description
    • isRequired

      boolean isRequired()
      Gets if this datapack is required.

      A "required" datapack will always be enabled on server startup, even if previously disabled.

      Returns:
      true if the pack is required
    • getCompatibility

      Datapack.Compatibility getCompatibility()
      Gets the compatibility status of this pack.
      Returns:
      the compatibility of the pack
    • getRequiredFeatures

      @Unmodifiable Set<FeatureFlag> getRequiredFeatures()
      Gets the set of required features for this datapack.
      Returns:
      the set of required features
    • getSource

      DatapackSource getSource()
      Gets the source for this datapack.
      Returns:
      the pack source