⭐
StarAPI Documentation
  • ⭐API Information
    • ❔About Our API's
    • ⬇️Installing Our API
  • 🌟StarAPI (Spigot/Paper)
    • 📂Abilities
      • ⏳Transmition
      • 🤯Implosion
      • 🏹MultiShot
    • 📂Builders
      • 👕Armor Builder
      • 📊Bossbar Builder
      • ☄️Command Builder
      • ⚔️Item Builder
      • 🧟‍♂️Mob Builder
      • 💯Scoreboard Builder
      • 🔗Webhook Builder
      • 🔨Message Builder
      • 🏗️Actionbar Builder
    • 📂Files
      • 📃Create Files
      • 📁Create Folders
      • 📖Read Files
      • 🖊️Write Files
    • 📂Inventory Utilities
      • 💎Animated Items
      • 📖Book Content
      • 📔Book GUI
      • 🎞️Filler
      • 🪁Inventory Items
      • 📝Inventory Name
      • 💀Inventory Skulls
    • 📂Message Utilities
      • 🤖Auto Responses
      • 🎨Message Colors
    • 📂Recipes
      • ⚒️Crafting Recipes
      • 🧑‍🍳Furnace Recipes
    • 📂Timers
      • 🕙Active Timers
      • ❌Cancel Timers
      • 🕙Delayed Timers
      • 🕐Create Timers
    • 📂Misc
      • 💀Give Skulls
      • 📈Progress Bars
      • ⬛Block Placer
Powered by GitBook
On this page
  • Overview
  • Constructors
  • Methods
  • Usage
  • Example
  1. StarAPI (Spigot/Paper)
  2. Recipes

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)

public 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

public Furnace registerRecipe(Material input, ItemStack output, String name, List<String> lore, Map<Enchantment, Integer> enchantments)

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 the Furnace class.

Usage

  1. Create a new instance of the Furnace class with the desired plugin.

  2. Use the registerRecipe method to register a custom furnace recipe.

  3. Provide the input item, output item, name, lore, and enchantments for the recipe.

  4. The recipe will be automatically added to the Bukkit server's recipe list.

Example

Plugin plugin = // your Plugin instance
Furnace furnace = new Furnace(plugin);
Material input = Material.IRON_INGOT;
ItemStack output = new ItemStack(Material.IRON_SWORD);
String name = "Custom Sword";
List<String> lore = Arrays.asList("Custom Lore Line 1", "Custom Lore Line 2");
Map<Enchantment, Integer> enchantments = new HashMap<>();
enchantments.put(Enchantment.DURABILITY, 1);
furnace.registerRecipe(input, output, name, lore, enchantments);

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.

PreviousCrafting RecipesNextTimers

Last updated 1 year ago

🌟
📂
🧑‍🍳