Class CraftingRecipe
java.lang.Object
org.bukkit.inventory.CraftingRecipe
- Direct Known Subclasses:
ShapedRecipe, ShapelessRecipe, TransmuteRecipe
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCraftingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result) -
Method Summary
Modifier and TypeMethodDescriptioncheckResult(@NotNull ItemStack result) Checks an ItemStack to be used in constructors related to CraftingRecipe is not empty.Gets the category which this recipe will appear in the recipe book under.getGroup()Get the group of this recipe.getKey()Return the namespaced identifier for this object.Get the result of this recipe.voidsetCategory(@NotNull CraftingBookCategory category) Sets the category which this recipe will appear in the recipe book under.voidSet the group of this recipe.
-
Constructor Details
-
CraftingRecipe
-
-
Method Details
-
getKey
-
getResult
-
getGroup
-
setGroup
-
getCategory
Gets the category which this recipe will appear in the recipe book under.
Defaults toCraftingBookCategory.MISCif not set.- Returns:
- recipe book category
-
setCategory
Sets the category which this recipe will appear in the recipe book under.
Defaults toCraftingBookCategory.MISCif not set.- Parameters:
category- recipe book category
-
checkResult
@Internal @NotNull protected static @NotNull ItemStack checkResult(@NotNull @NotNull ItemStack result) Checks an ItemStack to be used in constructors related to CraftingRecipe is not empty.- Parameters:
result- an ItemStack- Returns:
- the same result ItemStack
- Throws:
IllegalArgumentException- if theresultis an empty item (AIR)
-