Class GlowEnchantingInventory

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

public class GlowEnchantingInventory extends GlowInventory implements org.bukkit.inventory.EnchantingInventory
  • Constructor Details

    • GlowEnchantingInventory

      public GlowEnchantingInventory(org.bukkit.Location location, GlowPlayer player)
      Creates an instance for an enchanting table.
      Parameters:
      location - the enchanting table's location
      player - the enchanting player
  • Method Details

    • onPlayerEnchant

      public void onPlayerEnchant(int clicked)
    • getBookshelfCount

      public int getBookshelfCount()
      Returns the number of bookshelf blocks that are raising this enchanting table's level.
      Returns:
      the number of bookshelf blocks affecting this table
    • setItem

      public void setItem(org.bukkit.inventory.ItemStack item)
      Specified by:
      setItem in interface org.bukkit.inventory.EnchantingInventory
    • 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
    • getRawSlots

      public int getRawSlots()
      Description copied from class: GlowInventory
      Gets the number of slots in this inventory according to the protocol.

      Some inventories have 0 slots in the protocol, despite having slots.

      Overrides:
      getRawSlots in class GlowInventory
      Returns:
      The numbers of slots
    • getItem

      public org.bukkit.inventory.ItemStack getItem()
      Specified by:
      getItem in interface org.bukkit.inventory.EnchantingInventory
    • getSecondary

      public org.bukkit.inventory.ItemStack getSecondary()
      Specified by:
      getSecondary in interface org.bukkit.inventory.EnchantingInventory
    • setSecondary

      public void setSecondary(org.bukkit.inventory.ItemStack itemStack)
      Specified by:
      setSecondary in interface org.bukkit.inventory.EnchantingInventory
    • getLocation

      public org.bukkit.Location getLocation()
      Specified by:
      getLocation in interface org.bukkit.inventory.Inventory
      Overrides:
      getLocation in class GlowInventory