Interface DataPackManager


@Experimental public interface DataPackManager
Manager of data packs.
  • Method Details

    • getDataPacks

      @NotNull Collection<DataPack> getDataPacks()
      Return all the available DataPacks on the server.
      Returns:
      a Collection of DataPack
    • getDataPack

      @Nullable DataPack getDataPack(@NotNull NamespacedKey dataPackKey)
      Gets a DataPack by its key.
      Parameters:
      dataPackKey - the key of the DataPack
      Returns:
      the DataPack or null if it does not exist
    • getEnabledDataPacks

      @NotNull Collection<DataPack> getEnabledDataPacks(@NotNull World world)
      Return all the enabled DataPack in the World.
      Parameters:
      world - the world to search
      Returns:
      a Collection of DataPack
    • getDisabledDataPacks

      @NotNull Collection<DataPack> getDisabledDataPacks(@NotNull World world)
      Return all the disabled DataPack in the World.
      Parameters:
      world - the world to search
      Returns:
      a Collection of DataPack
    • isEnabledByFeature

      boolean isEnabledByFeature(@NotNull Material material, @NotNull World world)
      Gets if the Material is enabled for use by the features in World.
      Parameters:
      material - Material to check (needs to be an Material.isItem() or Material.isBlock())
      world - World to check
      Returns:
      True if the Item/Block related to the material is enabled
    • isEnabledByFeature

      boolean isEnabledByFeature(@NotNull EntityType entityType, @NotNull World world)
      Gets if the EntityType is enabled for use by the Features in World.
      Parameters:
      entityType - EntityType to check
      world - World to check
      Returns:
      True if the type of entity is enabled