类 CraftingRecipe
java.lang.Object
org.bukkit.inventory.CraftingRecipe
- 直接已知子类:
DyeRecipe,ImbueRecipe,ShapedRecipe,ShapelessRecipe,TransmuteRecipe
代表一个有序或无序的合成配方。
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明checkResult(@NotNull ItemStack result) 检查用于 CraftingRecipe 相关构造器的 ItemStack 是否为空。获取此配方在配方书中出现的类别。getGroup()获取此配方的分组。getKey()返回用于此对象的命名空间标识符.获取此配方的结果。voidsetCategory(@NotNull CraftingBookCategory category) 设置此配方在配方书中出现的类别。void设置此配方的分组。
-
构造器详细资料
-
CraftingRecipe
-
-
方法详细资料
-
getKey
从接口复制的说明:Keyed返回用于此对象的命名空间标识符.原文:Return the namespaced identifier for this object.
-
getResult
获取此配方的结果。原文: Get the result of this recipe.
-
getGroup
获取此配方的分组。具有相同分组的配方在客户端显示时可能会被分组在一起。原文: Get the group of this recipe. Recipes with the same group may be grouped together when displayed in the client.
- 返回:
- 配方分组。空字符串表示没有分组。不能为 null。
-
setGroup
设置此配方的分组。具有相同分组的配方在客户端显示时可能会被分组在一起。原文: Set the group of this recipe. Recipes with the same group may be grouped together when displayed in the client.
- 参数:
group- 配方分组。空字符串表示没有分组。不能为 null。
-
getCategory
获取此配方在配方书中出现的类别。
如果未设置,则默认为CraftingBookCategory.MISC。原文: Gets the category which this recipe will appear in the recipe book under.
Defaults toCraftingBookCategory.MISCif not set.- 返回:
- 配方书类别
-
setCategory
设置此配方在配方书中出现的类别。
如果未设置,则默认为CraftingBookCategory.MISC。原文: Sets the category which this recipe will appear in the recipe book under.
Defaults toCraftingBookCategory.MISCif not set.- 参数:
category- 配方书类别
-
checkResult
@Internal @NotNull protected static @NotNull ItemStack checkResult(@NotNull @NotNull ItemStack result) 检查用于 CraftingRecipe 相关构造器的 ItemStack 是否为空。原文: Checks an ItemStack to be used in constructors related to CraftingRecipe is not empty.
- 参数:
result- 一个 ItemStack- 返回:
- 相同的结果 ItemStack
- 抛出:
IllegalArgumentException- 如果result是空物品(AIR)
-