类的使用
org.bukkit.NamespacedKey
使用NamespacedKey的程序包
程序包
说明
Bukkit API的顶级程序包, 包含通用的API类和接口.
与属性有关的类 (Minecraft Wiki - 属性).
用于操作在
世界内的三位像素(方块),包括一些特定的状态.与旗帜方块有关的类.
Classes concerning damage types and sources applicable to living entities.
为在
世界内存在的非三维像素单位(实体)提供的接口,包含玩家、怪物、抛射物等.与实体的持久化内存有关的类, 目前仅与村民有关.
Classes to facilitate world
Structure
generation.参与操作玩家物品栏和物品交互的类.
用于操作可以存储在
物品堆的额外数据的接口.Isolated components which may form part of item meta.
通过本包的API可允许向物品附加自定义数据.
盔甲纹饰元数据类型。
与战利品表产生与操作有关的类 (Minecraft Wiki - 战利品表).
用于简化处理
地图显示内容的类.Classes dedicated to handling data pack information.
用于向各种对象附加持久化数据的类.
代表每种
药水属性和操作的类的集合.与玩家资料有关的类.
Class related to
RegistryClasses related to creating or using
structures without creating Structure
blocks in the world.-
org.bukkit中NamespacedKey的使用
返回NamespacedKey的org.bukkit中的方法修饰符和类型方法说明static @Nullable NamespacedKeyNamespacedKey.fromString(@NotNull String key) 根据提供的字符串获取 NamespacedKey 对象.static @Nullable NamespacedKeyNamespacedKey.fromString(@NotNull String string, @Nullable Plugin defaultNamespace) 根据提供的字符串获取 NamespacedKey 对象, 若字符串未指定命名空间名, 将使用参数给定的默认命名空间.Art.getKey()已过时。Fluid.getKey()已过时。键可能并不总是存在,请改用RegistryAware.getKeyOrThrow()。abstract @NotNull NamespacedKeyGameEvent.getKey()已过时。键可能并非始终存在, 请使用RegistryAware.getKeyOrThrow()代替.GameRule.getKey()已过时。键不一定始终存在, 请使用RegistryAware.getKeyOrThrow().JukeboxSong.getKey()已过时。键可能并不总是存在,请改用RegistryAware.getKeyOrThrow()。Keyed.getKey()返回用于此对象的命名空间标识符.Material.getKey()已过时。键可能并非始终存在, 请使用Material.getKeyOrThrow()代替.abstract @NotNull NamespacedKeyMusicInstrument.getKey()已过时。键可能并不总是存在,请改用RegistryAware.getKeyOrThrow()。Particle.getKey()已过时。键可能并不总是存在,请改用Particle.getKeyOrThrow()。Sound.getKey()已过时。键不一定总是存在, 请改用RegistryAware.getKeyOrThrow().Statistic.getKey()StructureType.getKey()已过时。Material.getKeyOrNull()Particle.getKeyOrNull()Material.getKeyOrThrow()Particle.getKeyOrThrow()static @NotNull NamespacedKey获取 Minecraft 命名空间内的一个 key.static @NotNull NamespacedKeyNamespacedKey.randomKey()已过时。插件应永不使用此方法, 仅供内部使用!!参数类型为NamespacedKey的org.bukkit中的方法修饰符和类型方法说明static @NotNull KeyedBossBarBukkit.createBossBar(@NotNull NamespacedKey key, @Nullable String title, @NotNull BarColor color, @NotNull BarStyle style, @NotNull BarFlag... flags) 创建一个Boss血量条实例.Server.createBossBar(@NotNull NamespacedKey key, @Nullable String title, @NotNull BarColor color, @NotNull BarStyle style, @NotNull BarFlag... flags) 创建一个Boss血量条实例.Registry.get(@NotNull NamespacedKey key) 通过键获取对象。Registry.SimpleRegistry.get(@NotNull NamespacedKey key) <B extends Keyed>
BUnsafeValues.get(Registry<B> registry, NamespacedKey key) 已过时。static @Nullable AdvancementBukkit.getAdvancement(@NotNull NamespacedKey key) 通过Key获得特定的进度对象.Server.getAdvancement(@NotNull NamespacedKey key) 通过Key获得特定的进度对象.static @Nullable KeyedBossBarBukkit.getBossBar(@NotNull NamespacedKey key) 获取由此key指定的KeyedBossBar.Server.getBossBar(@NotNull NamespacedKey key) 获取由指定key标识的KeyedBossBar.GameEvent.getByKey(@NotNull NamespacedKey namespacedKey) 已过时。static @Nullable MusicInstrumentMusicInstrument.getByKey(@NotNull NamespacedKey namespacedKey) 已过时。UnsafeValues.getFeatureFlag(@NotNull NamespacedKey key) 已过时。UnsafeValues.getInternalPotionData(NamespacedKey key) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Bukkit.getLootTable(@NotNull NamespacedKey key) 获取指定的战利品表.Server.getLootTable(@NotNull NamespacedKey key) 获取指定的战利品表.Registry.getOrThrow(@NotNull NamespacedKey key) 通过键获取对象。Registry.SimpleRegistry.getOrThrow(@NotNull NamespacedKey key) Bukkit.getRecipe(@NotNull NamespacedKey recipeKey) 根据指定的 key 获取配方.Server.getRecipe(@NotNull NamespacedKey recipeKey) 根据指定的 key 获取配方.获取服务器中已定义的标签.获取服务器中已定义的标签.UnsafeValues.loadAdvancement(NamespacedKey key, String advancement) 已过时。将指定字符串表示的进度加载到服务器中。booleanUnsafeValues.removeAdvancement(NamespacedKey key) 已过时。static booleanBukkit.removeBossBar(@NotNull NamespacedKey key) 移除此key指定的KeyedBossBar.booleanServer.removeBossBar(@NotNull NamespacedKey key) 移除由指定key标识的KeyedBossBar.static booleanBukkit.removeRecipe(@NotNull NamespacedKey key) 从服务器移除指定的合成配方.booleanServer.removeRecipe(@NotNull NamespacedKey key) 从服务器移除指定的合成配方. -
org.bukkit.attribute中NamespacedKey的使用
修饰符和类型方法说明Attribute.getKey()已过时。键可能并不总是存在,请改用RegistryAware.getKeyOrThrow().AttributeModifier.getKey()参数类型为NamespacedKey的org.bukkit.attribute中的构造器限定符构造器说明AttributeModifier(@NotNull NamespacedKey key, double amount, @NotNull AttributeModifier.Operation operation, @NotNull EquipmentSlotGroup slot) -
org.bukkit.block中NamespacedKey的使用
修饰符和类型方法说明Biome.getKey()已过时。密钥可能并非始终存在, 请改用RegistryAware.getKeyOrThrow().BlockType.getKey()已过时。键可能并不总是存在,请改用RegistryAware.getKeyOrThrow()。Skull.getNoteBlockSound()获取头颅放置在音符盒上时播放的音效.参数类型为NamespacedKey的org.bukkit.block中的方法修饰符和类型方法说明voidSkull.setNoteBlockSound(@Nullable NamespacedKey noteBlockSound) 设置头颅放置在音符盒上时播放的音效. -
org.bukkit.block.banner中NamespacedKey的使用
-
org.bukkit.damage中NamespacedKey的使用
修饰符和类型方法说明DamageType.getKey()已过时。A key might not always be present, useRegistryAware.getKeyOrThrow()instead. -
org.bukkit.enchantments中NamespacedKey的使用
修饰符和类型方法说明abstract @NotNull NamespacedKeyEnchantment.getKey()已过时。A key might not always be present, useRegistryAware.getKeyOrThrow()instead.参数类型为NamespacedKey的org.bukkit.enchantments中的方法修饰符和类型方法说明static @Nullable EnchantmentEnchantment.getByKey(@Nullable NamespacedKey key) 已过时。仅为保障作向后兼容性, 请使用Registry.get(NamespacedKey)instead -
org.bukkit.entity中NamespacedKey的使用
修饰符和类型方法说明Cat.Type.getKey()已过时。键可能并不总是存在,请使用RegistryAware.getKeyOrThrow()代替。Chicken.Variant.getKey()已过时。key 可能不总是存在, 请使用RegistryAware.getKeyOrThrow()代替.Cow.Variant.getKey()已过时。键可能并不总是存在, 请改用RegistryAware.getKeyOrThrow().EntityType.getKey()已过时。键可能并不总是存在, 请改用EntityType.getKeyOrThrow().Frog.Variant.getKey()已过时。键不一定总是存在, 请改用RegistryAware.getKeyOrThrow().Pig.Variant.getKey()已过时。键可能并不总是存在,请改用RegistryAware.getKeyOrThrow().Villager.Profession.getKey()已过时。密钥可能并不总是存在,请使用RegistryAware.getKeyOrThrow()代替。Villager.Type.getKey()已过时。密钥可能并不总是存在,请使用RegistryAware.getKeyOrThrow()代替。Wolf.Variant.getKey()已过时。A key might not always be present, useRegistryAware.getKeyOrThrow()instead.ZombieNautilus.Variant.getKey()已过时。密钥可能并不总是存在,请使用RegistryAware.getKeyOrThrow()代替。EntityType.getKeyOrNull()EntityType.getKeyOrThrow()LivingEntity.getWaypointStyle()获取此实体的路径点样式。返回变量类型为NamespacedKey的类型的org.bukkit.entity中的方法参数类型为NamespacedKey的org.bukkit.entity中的方法修饰符和类型方法说明booleanHumanEntity.discoverRecipe(@NotNull NamespacedKey recipe) 为玩家发现一个尚未发现的配方。booleanHumanEntity.hasDiscoveredRecipe(@NotNull NamespacedKey recipe) 检查此实体是否已发现指定配方。@NotNull CompletableFuture<byte[]>Player.retrieveCookie(@NotNull NamespacedKey key) 从该玩家客户端检索一个Cookie.voidLivingEntity.setWaypointStyle(@Nullable NamespacedKey key) 设置此实体的路径点样式。voidPlayer.showDialog(@NotNull NamespacedKey dialog) 向玩家显示对话框.voidPlayer.storeCookie(@NotNull NamespacedKey key, @org.jetbrains.annotations.NotNull byte[] value) 在该玩家客户端中存储一个Cookie.booleanHumanEntity.undiscoverRecipe(@NotNull NamespacedKey recipe) 取消玩家对一个已发现配方的发现状态。类型变量类型为NamespacedKey的org.bukkit.entity中的方法参数修饰符和类型方法说明intHumanEntity.discoverRecipes(@NotNull Collection<NamespacedKey> recipes) 为玩家发现一组尚未发现的配方。intHumanEntity.undiscoverRecipes(@NotNull Collection<NamespacedKey> recipes) 取消玩家对一组已发现配方的发现状态。 -
org.bukkit.entity.memory中NamespacedKey的使用
修饰符和类型方法说明MemoryKey.getKey()已过时。密钥可能并不总是存在,请使用MemoryKey.getKeyOrThrow()代替。MemoryKey.getKeyOrNull()MemoryKey.getKeyOrThrow()参数类型为NamespacedKey的org.bukkit.entity.memory中的方法 -
org.bukkit.event.player中NamespacedKey的使用
修饰符和类型方法说明PlayerCustomClickEvent.getId()获取自定义操作的 ID.PlayerRecipeDiscoverEvent.getRecipe()获取本次解锁的配方的 NamespacedKey.参数类型为NamespacedKey的org.bukkit.event.player中的构造器限定符构造器说明PlayerCustomClickEvent(@NotNull Player player, @NotNull NamespacedKey id, @Nullable com.google.gson.JsonElement data) PlayerRecipeDiscoverEvent(@NotNull Player who, @NotNull NamespacedKey recipe) -
org.bukkit.event.world中NamespacedKey的使用
返回变量类型为NamespacedKey的类型的org.bukkit.event.world中的方法修饰符和类型方法说明AsyncStructureGenerateEvent.getBlockTransformers()获取所有方块转换器的不可修改映射。AsyncStructureGenerateEvent.getEntityTransformers()获取所有实体转换器的不可修改映射。参数类型为NamespacedKey的org.bukkit.event.world中的方法修饰符和类型方法说明AsyncStructureGenerateEvent.getBlockTransformer(@NotNull NamespacedKey key) 通过键获取方块转换器。AsyncStructureGenerateEvent.getEntityTransformer(@NotNull NamespacedKey key) 通过键获取实体转换器。voidAsyncStructureGenerateEvent.removeBlockTransformer(@NotNull NamespacedKey key) 移除一个方块转换器。voidAsyncStructureGenerateEvent.removeEntityTransformer(@NotNull NamespacedKey key) 移除一个实体转换器。voidAsyncStructureGenerateEvent.setBlockTransformer(@NotNull NamespacedKey key, @NotNull BlockTransformer transformer) 将方块转换器设置到指定键。voidAsyncStructureGenerateEvent.setEntityTransformer(@NotNull NamespacedKey key, @NotNull EntityTransformer transformer) 将实体转换器设置到指定键。 -
org.bukkit.generator.structure中NamespacedKey的使用
修饰符和类型方法说明abstract @NotNull NamespacedKeyStructure.getKey()已过时。键可能并不总是存在,请改用RegistryAware.getKeyOrThrow()。abstract @NotNull NamespacedKeyStructureType.getKey()已过时。键可能并不总是存在,请改用RegistryAware.getKeyOrThrow()。 -
org.bukkit.inventory中NamespacedKey的使用
修饰符和类型方法说明ItemFlag.getComponent()BrewingRecipe.getKey()CookingRecipe.getKey()CraftingRecipe.getKey()ItemType.getKey()已过时。键可能并不总是存在,请改用RegistryAware.getKeyOrThrow()。MenuType.getKey()已过时。键可能并非始终存在, 请改用RegistryAware.getKeyOrThrow().SmithingRecipe.getKey()StonecuttingRecipe.getKey()参数类型为NamespacedKey的org.bukkit.inventory中的构造器限定符构造器说明BlastingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice input, float experience, int cookingTime) BlastingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull Material source, float experience, int cookingTime) BrewingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result) 已过时。this is for internal use only and will not create a viable recipeCampfireRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice input, float experience, int cookingTime) CampfireRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull Material source, float experience, int cookingTime) CookingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice input, float experience, int cookingTime) 创建一个烹饪配方来制作指定的物品堆。CookingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull Material source, float experience, int cookingTime) 创建一个烹饪配方来制作指定的物品堆。protectedCraftingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result) DyeRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice input, @NotNull RecipeChoice material) Create a dye recipe to produce a result of the specified type.DyeRecipe(@NotNull NamespacedKey key, @NotNull Material result, @NotNull RecipeChoice input, @NotNull RecipeChoice material) Create a dye recipe to produce a result of the specified type.FurnaceRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice input, float experience, int cookingTime) 创建一个熔炉配方来制作指定的 ItemStack.FurnaceRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull Material source, float experience, int cookingTime) 创建一个熔炉配方来制作指定的 ItemStack.FurnaceRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull Material source, int data, float experience, int cookingTime) 已过时。ImbueRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice input, @NotNull RecipeChoice material) Create an imbue recipe to produce a result of the specified type.ImbueRecipe(@NotNull NamespacedKey key, @NotNull Material result, @NotNull RecipeChoice input, @NotNull RecipeChoice material) Create an imbue recipe to produce a result of the specified type.ShapedRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result) 创建一个合成指定物品的配方。ShapelessRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result) 创建一个合成指定物品的无序配方。SmithingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @Nullable RecipeChoice base, @Nullable RecipeChoice addition) 已过时。从 Minecraft 1.20 开始,锻造配方现在被分为两种不同的配方类型:SmithingTransformRecipe和SmithingTrimRecipe。SmithingTransformRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @Nullable RecipeChoice template, @Nullable RecipeChoice base, @Nullable RecipeChoice addition) 创建一个锻造配方以产生指定的结果物品。SmithingTrimRecipe(@NotNull NamespacedKey key, @Nullable RecipeChoice template, @Nullable RecipeChoice base, @Nullable RecipeChoice addition) 已过时。必须指定 trimPattern。SmithingTrimRecipe(@NotNull NamespacedKey key, @Nullable RecipeChoice template, @Nullable RecipeChoice base, @Nullable RecipeChoice addition, @NotNull TrimPattern trimPattern) SmokingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice input, float experience, int cookingTime) SmokingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull Material source, float experience, int cookingTime) StonecuttingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice input) 创建一个烹饪配方以合成指定的物品。StonecuttingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull Material source) 创建一个切石配方以合成指定的物品。TransmuteRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice input, @NotNull RecipeChoice material) 创建一个转化配方以产生指定类型的结果。TransmuteRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice input, @NotNull RecipeChoice material, int minimumMaterialCount, int maximumMaterialCount, boolean addMaterialCountToResult) Create a transmute recipe to produce a result of the specified type.TransmuteRecipe(@NotNull NamespacedKey key, @NotNull Material result, @NotNull RecipeChoice input, @NotNull RecipeChoice material) 创建一个转化配方以产生指定类型的结果。 -
org.bukkit.inventory.meta中NamespacedKey的使用
修饰符和类型方法说明ItemMeta.getDamageTypeKey()获取此物品能造成的伤害类型的命名空间键.ItemMeta.getItemModel()获取自定义的物品模型.SkullMeta.getNoteBlockSound()获取在音符盒上放置此头颅时播放的音效.ItemMeta.getTooltipStyle()获取自定义的工具提示样式.返回变量类型为NamespacedKey的类型的org.bukkit.inventory.meta中的方法参数类型为NamespacedKey的org.bukkit.inventory.meta中的方法修饰符和类型方法说明voidKnowledgeBookMeta.addRecipe(@NotNull NamespacedKey... recipes) 向书的末尾添加新的合成配方.voidItemMeta.setDamageTypeKey(@Nullable NamespacedKey type) 设置此物品能造成的伤害类型的命名空间键.voidItemMeta.setItemModel(@Nullable NamespacedKey itemModel) 设置自定义的物品模型.voidSkullMeta.setNoteBlockSound(@Nullable NamespacedKey noteBlockSound) 设置在音符盒上放置此头颅时播放的音效.voidItemMeta.setTooltipStyle(@Nullable NamespacedKey tooltipStyle) 设置自定义工具提示样式。类型变量类型为NamespacedKey的org.bukkit.inventory.meta中的方法参数修饰符和类型方法说明voidKnowledgeBookMeta.setRecipes(@NotNull List<NamespacedKey> recipes) 清空书本内原有的合成配方, 替换为提供的合成配方. -
org.bukkit.inventory.meta.components中NamespacedKey的使用
修饰符和类型方法说明EquippableComponent.getCameraOverlay()获取装备时使用的相机覆盖层键。UseCooldownComponent.getCooldownGroup()获取用于相似物品的自定义冷却组(如果已设置)。EquippableComponent.getModel()获取装备时使用的模型键。JukeboxPlayableComponent.getSongKey()获取分配给此组件的歌曲的键。修饰符和类型方法说明voidEquippableComponent.setCameraOverlay(@Nullable NamespacedKey key) 设置装备时使用的相机覆盖层键。voidUseCooldownComponent.setCooldownGroup(@Nullable NamespacedKey key) 设置用于相似物品的自定义冷却组。voidEquippableComponent.setModel(@Nullable NamespacedKey key) 设置装备时使用的模型键。voidJukeboxPlayableComponent.setSongKey(@NotNull NamespacedKey song) 设置分配给此组件的歌曲的键。 -
org.bukkit.inventory.meta.tags中NamespacedKey的使用
修饰符和类型方法说明<T,Z> Z CustomItemTagContainer.getCustomTag(@NotNull NamespacedKey key, @NotNull ItemTagType<T, Z> type) 已过时。返回存储在物品上的自定义标签的值.<T,Z> boolean CustomItemTagContainer.hasCustomTag(@NotNull NamespacedKey key, @NotNull ItemTagType<T, Z> type) 已过时。返回物品元数据是否注册了与提供的参数匹配的自定义标签.voidCustomItemTagContainer.removeCustomTag(@NotNull NamespacedKey key) 已过时。从物品元数据中移除自定义键.<T,Z> void CustomItemTagContainer.setCustomTag(@NotNull NamespacedKey key, @NotNull ItemTagType<T, Z> type, Z value) 已过时。在ItemMeta上存储一个自定义值. -
org.bukkit.inventory.meta.trim中NamespacedKey的使用
修饰符和类型方法说明TrimMaterial.getKey()已过时。A key might not always be present, useRegistryAware.getKeyOrThrow()instead.TrimPattern.getKey()已过时。A key might not always be present, useRegistryAware.getKeyOrThrow()instead. -
org.bukkit.loot中NamespacedKey的使用
返回NamespacedKey的org.bukkit.loot中的方法 -
org.bukkit.map中NamespacedKey的使用
返回NamespacedKey的org.bukkit.map中的方法 -
org.bukkit.packs中NamespacedKey的使用
参数类型为NamespacedKey的org.bukkit.packs中的方法 -
org.bukkit.persistence中NamespacedKey的使用
返回变量类型为NamespacedKey的类型的org.bukkit.persistence中的方法参数类型为NamespacedKey的org.bukkit.persistence中的方法修饰符和类型方法说明<P,C> C PersistentDataContainer.get(@NotNull NamespacedKey key, @NotNull PersistentDataType<P, C> type) 返回存储在PersistentDataHolder实例上的元数据值。<P,C> C PersistentDataContainer.getOrDefault(@NotNull NamespacedKey key, @NotNull PersistentDataType<P, C> type, C defaultValue) 返回存储在PersistentDataHolder实例上的元数据值。booleanPersistentDataContainer.has(@NotNull NamespacedKey key) 返回持久元数据提供者是否注册了匹配所提供参数的元数据。<P,C> boolean PersistentDataContainer.has(@NotNull NamespacedKey key, @NotNull PersistentDataType<P, C> type) 返回持久元数据提供者是否注册了匹配所提供参数的元数据。voidPersistentDataContainer.remove(@NotNull NamespacedKey key) 从PersistentDataHolder实例中移除自定义键。<P,C> void PersistentDataContainer.set(@NotNull NamespacedKey key, @NotNull PersistentDataType<P, C> type, C value) 在PersistentDataHolder实例上存储元数据值。 -
org.bukkit.potion中NamespacedKey的使用
修饰符和类型方法说明abstract @NotNull NamespacedKeyPotionEffectType.getKey()已过时。A key might not always be present, useRegistryAware.getKeyOrThrow()instead.PotionType.getKey()已过时。键不一定总是存在, 请使用PotionType.getKeyOrThrow()代替.PotionType.getKeyOrNull()PotionType.getKeyOrThrow()参数类型为NamespacedKey的org.bukkit.potion中的方法修饰符和类型方法说明static @Nullable PotionEffectTypePotionEffectType.getByKey(@Nullable NamespacedKey key) 已过时。仅为保障向后兼容性, 请使用Registry.get(NamespacedKey) -
org.bukkit.profile中NamespacedKey的使用
修饰符和类型方法说明PlayerSkinPatch.getCapeTexturePatch()获取修补到此配置文件上的配置文件披风纹理的路径。PlayerSkinPatch.getElytraTexturePatch()获取修补到此配置文件上的配置文件鞘翅纹理的路径。PlayerSkinPatch.getTexturePatch()获取修补到此配置文件上的配置文件纹理的路径。参数类型为NamespacedKey的org.bukkit.profile中的方法修饰符和类型方法说明voidPlayerSkinPatch.setCapeTexturePatch(@Nullable NamespacedKey cape) 设置修补到此配置文件上的配置文件披风纹理的路径。voidPlayerSkinPatch.setElytraTexturePatch(@Nullable NamespacedKey elytra) 设置修补到此配置文件上的配置文件鞘翅纹理的路径。voidPlayerSkinPatch.setTexturePatch(@Nullable NamespacedKey texture) 设置修补到此配置文件上的配置文件纹理的路径。 -
org.bukkit.registry中NamespacedKey的使用
修饰符和类型方法说明RegistryAware.getKeyOrNull()获取此实例的键(如果已注册),否则返回null。RegistryAware.getKeyOrThrow()获取此实例的键(如果已注册),否则抛出错误。 -
org.bukkit.structure中NamespacedKey的使用
返回变量类型为NamespacedKey的类型的org.bukkit.structure中的方法参数类型为NamespacedKey的org.bukkit.structure中的方法修饰符和类型方法说明voidStructureManager.deleteStructure(@NotNull NamespacedKey structureKey) 注销指定结构并从主世界文件夹中删除其结构文件。voidStructureManager.deleteStructure(@NotNull NamespacedKey structureKey, boolean unregister) 从主世界文件夹中删除指定结构的结构文件。StructureManager.getStructure(@NotNull NamespacedKey structureKey) 获取已注册的结构。StructureManager.getStructureFile(@NotNull NamespacedKey structureKey) 根据 NamespacedKey 获取结构文件在主世界目录中的位置,使用格式 world/generated/{NAMESPACE}/structures/{KEY}.nbt。StructureManager.loadStructure(@NotNull NamespacedKey structureKey) 加载指定键的结构并自动注册它。StructureManager.loadStructure(@NotNull NamespacedKey structureKey, boolean register) 为指定键加载结构,并可选择注册它。StructureManager.registerStructure(@NotNull NamespacedKey structureKey, @NotNull Structure structure) 注册给定的结构。voidStructureManager.saveStructure(@NotNull NamespacedKey structureKey) 将当前已注册的结构保存到主世界文件夹, 按照 {#getStructureFile(NamespacedKey} 指定的方式。voidStructureManager.saveStructure(@NotNull NamespacedKey structureKey, @NotNull Structure structure) 将具有给定键的结构保存到主世界文件夹。StructureManager.unregisterStructure(@NotNull NamespacedKey structureKey) 注销结构。
RegistryAware.getKeyOrThrow()instead.