Class GlowFurnaceInventory

java.lang.Object
net.glowstone.inventory.GlowInventory
net.glowstone.inventory.GlowFurnaceInventory
All Implemented Interfaces:
Iterable<org.bukkit.inventory.ItemStack>, org.bukkit.inventory.FurnaceInventory, org.bukkit.inventory.Inventory

public class GlowFurnaceInventory extends GlowInventory implements org.bukkit.inventory.FurnaceInventory
  • Constructor Details

    • GlowFurnaceInventory

      public GlowFurnaceInventory(org.bukkit.block.Furnace owner)
      Creates the given furnace's inventory.
      Parameters:
      owner - the furnace BlockState
  • Method Details

    • setItem

      public void setItem(int index, org.bukkit.inventory.ItemStack item)
      Specified by:
      setItem in interface org.bukkit.inventory.Inventory
      Overrides:
      setItem in class GlowInventory
    • getResult

      public org.bukkit.inventory.ItemStack getResult()
      Specified by:
      getResult in interface org.bukkit.inventory.FurnaceInventory
    • setResult

      public void setResult(org.bukkit.inventory.ItemStack stack)
      Specified by:
      setResult in interface org.bukkit.inventory.FurnaceInventory
    • getFuel

      public org.bukkit.inventory.ItemStack getFuel()
      Specified by:
      getFuel in interface org.bukkit.inventory.FurnaceInventory
    • setFuel

      public void setFuel(org.bukkit.inventory.ItemStack stack)
      Specified by:
      setFuel in interface org.bukkit.inventory.FurnaceInventory
    • getSmelting

      public org.bukkit.inventory.ItemStack getSmelting()
      Specified by:
      getSmelting in interface org.bukkit.inventory.FurnaceInventory
    • setSmelting

      public void setSmelting(org.bukkit.inventory.ItemStack stack)
      Specified by:
      setSmelting in interface org.bukkit.inventory.FurnaceInventory
    • getHolder

      public org.bukkit.block.Furnace getHolder()
      Description copied from class: GlowInventory
      The owner of this inventory.
      Specified by:
      getHolder in interface org.bukkit.inventory.FurnaceInventory
      Specified by:
      getHolder in interface org.bukkit.inventory.Inventory
      Overrides:
      getHolder in class GlowInventory
    • handleShiftClick

      public void handleShiftClick(GlowPlayer player, org.bukkit.inventory.InventoryView view, int clickedSlot, org.bukkit.inventory.ItemStack clickedItem)
      Description copied from class: GlowInventory
      Handle a shift click in this inventory by the specified player.

      The default implementation distributes items from the right to the left and from the bottom to the top.

      Overrides:
      handleShiftClick in class GlowInventory
      Parameters:
      player - The player who clicked
      view - The inventory view in which was clicked
      clickedSlot - The slot in the view
      clickedItem - The item at which was clicked
    • itemPlaceAllowed

      public boolean itemPlaceAllowed(int slot, org.bukkit.inventory.ItemStack stack)
      Description copied from class: GlowInventory
      Check whether it is allowed for a player to insert the given ItemStack at the slot, regardless of the slot's current contents.

      Should return false for crafting output slots or armor slots which cannot accept the given item.

      Overrides:
      itemPlaceAllowed in class GlowInventory
      Parameters:
      slot - The slot number.
      stack - The stack to add.
      Returns:
      Whether the stack can be added there.