程序包 org.bukkit.packs

# 接口 DataPackManager

public interface DataPackManager
Manager of data packs.

- ## 方法概要

  修饰符和类型
  方法
  说明
  `@Nullable DataPack`
  `getDataPack(@NotNull NamespacedKey dataPackKey)`
  Gets a `DataPack` by its key.
  `@NotNull Collection<DataPack>`
  `getDataPacks()`
  Return all the available `DataPack`s on the server.
  `@NotNull Collection<DataPack>`
  `getDisabledDataPacks(@NotNull World world)`
  Return all the disabled `DataPack` in the World.
  `@NotNull Collection<DataPack>`
  `getEnabledDataPacks(@NotNull World world)`
  Return all the enabled `DataPack` in the World.
  `boolean`
  `isEnabledByFeature(@NotNull BlockType blockType, @NotNull World world)`
  Gets if the BlockType is enabled for use by the features in World.
  `boolean`
  `isEnabledByFeature(@NotNull EntityType entityType, @NotNull World world)`
  Gets if the EntityType is enabled for use by the Features in World.
  `boolean`
  `isEnabledByFeature(@NotNull ItemType itemType, @NotNull World world)`
  Gets if the ItemType is enabled for use by the features in World.
  `boolean`
  `isEnabledByFeature(@NotNull Material material, @NotNull World world)`
  Gets if the Material is enabled for use by the features in World.

- ## 方法详细资料

  - ### getDataPacks

    @NotNull @NotNull Collection<DataPack> getDataPacks()
    Return all the available `DataPack`s on the server.
    返回:
      a Collection of `DataPack`

  - ### getDataPack

    @Nullable @Nullable DataPack getDataPack(@NotNull @NotNull NamespacedKey dataPackKey)
    Gets a `DataPack` by its key.
    参数:
      `dataPackKey` - the key of the `DataPack`
    返回:
      the `DataPack` or null if it does not exist

  - ### getEnabledDataPacks

    @NotNull @NotNull Collection<DataPack> getEnabledDataPacks(@NotNull @NotNull World world)
    Return all the enabled `DataPack` in the World.
    参数:
      `world` - the world to search
    返回:
      a Collection of `DataPack`

  - ### getDisabledDataPacks

    @NotNull @NotNull Collection<DataPack> getDisabledDataPacks(@NotNull @NotNull World world)
    Return all the disabled `DataPack` in the World.
    参数:
      `world` - the world to search
    返回:
      a Collection of `DataPack`

  - ### isEnabledByFeature

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

  - ### isEnabledByFeature

    @Internal boolean isEnabledByFeature(@NotNull @NotNull ItemType itemType, @NotNull @NotNull World world)
    Gets if the ItemType is enabled for use by the features in World.
    参数:
      `itemType` - ItemType to check
      `world` - World to check
    返回:
      `True` if the ItemType is enabled

  - ### isEnabledByFeature

    @Internal boolean isEnabledByFeature(@NotNull @NotNull BlockType blockType, @NotNull @NotNull World world)
    Gets if the BlockType is enabled for use by the features in World.
    参数:
      `blockType` - BlockType to check
      `world` - World to check
    返回:
      `True` if the BlockType is enabled

  - ### isEnabledByFeature

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