程序包 org.bukkit.packs
接口 DataPackManager
public interface DataPackManager
数据包管理器.
-
方法概要
修饰符和类型方法说明getDataPack(@NotNull NamespacedKey dataPackKey) 通过键获取DataPack.返回服务器上所有可用的DataPack.getDisabledDataPacks(@NotNull World world) 返回世界中所有禁用的DataPack.getEnabledDataPacks(@NotNull World world) 返回世界中所有启用的DataPack.booleanisEnabledByFeature(@NotNull BlockType blockType, @NotNull World world) 获取BlockType是否在世界中被特性启用.booleanisEnabledByFeature(@NotNull EntityType entityType, @NotNull World world) 获取EntityType是否在世界中被特性启用.booleanisEnabledByFeature(@NotNull ItemType itemType, @NotNull World world) 获取ItemType是否在世界中被特性启用.booleanisEnabledByFeature(@NotNull Material material, @NotNull World world) 获取Material是否在世界中被特性启用.
-
方法详细资料
-
getDataPacks
- 返回:
DataPack的集合
-
getDataPack
-
getEnabledDataPacks
- 参数:
world- 要搜索的世界- 返回:
DataPack的集合
-
getDisabledDataPacks
- 参数:
world- 要搜索的世界- 返回:
DataPack的集合
-
isEnabledByFeature
获取Material是否在世界中被特性启用.原文: Gets if the Material is enabled for use by the features in World.
- 参数:
material- 要检查的Material(需要是Material.isItem()或Material.isBlock())world- 要检查的世界- 返回:
True如果与material相关的物品/方块被启用
-
isEnabledByFeature
@Internal boolean isEnabledByFeature(@NotNull @NotNull ItemType itemType, @NotNull @NotNull World world) 获取ItemType是否在世界中被特性启用.原文: Gets if the ItemType is enabled for use by the features in World.
- 参数:
itemType- 要检查的ItemTypeworld- 要检查的世界- 返回:
True如果ItemType被启用
-
isEnabledByFeature
@Internal boolean isEnabledByFeature(@NotNull @NotNull BlockType blockType, @NotNull @NotNull World world) 获取BlockType是否在世界中被特性启用.原文: Gets if the BlockType is enabled for use by the features in World.
- 参数:
blockType- 要检查的BlockTypeworld- 要检查的世界- 返回:
True如果BlockType被启用
-
isEnabledByFeature
获取EntityType是否在世界中被特性启用.原文: Gets if the EntityType is enabled for use by the Features in World.
- 参数:
entityType- 要检查的EntityTypeworld- 要检查的世界- 返回:
True如果实体类型被启用
-