Furnace Recipes
Create furnace recipes with ease
Overview
The Furnace
class provides a utility for registering custom furnace recipes in Bukkit.
Constructors
Furnace(Plugin plugin)
Furnace(Plugin plugin)
Creates a new instance of the Furnace
class with the specified plugin.
Parameters
plugin
: The Plugin instance representing the plugin that owns this furnace recipe.
Methods
registerRecipe
registerRecipe
Registers a custom furnace recipe.
Parameters
input
: The Material representing the input item for the recipe.output
: The ItemStack representing the output item of the recipe.name
: The display name of the output item.lore
: The lore of the output item.enchantments
: A map of enchantments and their levels for the output item.
Returns
Furnace
: The current instance of theFurnace
class.
Usage
Create a new instance of the
Furnace
class with the desired plugin.Use the
registerRecipe
method to register a custom furnace recipe.Provide the input item, output item, name, lore, and enchantments for the recipe.
The recipe will be automatically added to the Bukkit server's recipe list.
Example
In this example, we register a custom furnace recipe that converts iron ingots into iron swords. The output iron sword has a custom name, lore, and enchantment.
Last updated