Interface DataPackManager


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

      @Internal boolean isEnabledByFeature(@NotNull ItemType itemType, @NotNull World world)
      Gets if the ItemType is enabled for use by the features in World.
      Parameters:
      itemType - ItemType to check
      world - World to check
      Returns:
      True if the ItemType is enabled
      API Note:
      this method is not ready for public usage yet
    • isEnabledByFeature

      @Internal boolean isEnabledByFeature(@NotNull BlockType blockType, @NotNull World world)
      Gets if the BlockType is enabled for use by the features in World.
      Parameters:
      blockType - BlockType to check
      world - World to check
      Returns:
      True if the BlockType is enabled
      API Note:
      this method is not ready for public usage yet
    • 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