Package net.glowstone.inventory
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 Summary
ConstructorDescriptionGlowEnchantingInventory
(org.bukkit.Location location, GlowPlayer player) Creates an instance for an enchanting table. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the number of bookshelf blocks that are raising this enchanting table's level.org.bukkit.inventory.ItemStack
getItem()
org.bukkit.Location
int
Gets the number of slots in this inventory according to the protocol.org.bukkit.inventory.ItemStack
void
onPlayerEnchant
(int clicked) void
setItem
(int index, org.bukkit.inventory.ItemStack item) void
setItem
(org.bukkit.inventory.ItemStack item) void
setSecondary
(org.bukkit.inventory.ItemStack itemStack) Methods inherited from class net.glowstone.inventory.GlowInventory
addItem, addItemStack, addViewer, all, all, clear, clear, close, consumeItem, consumeItem, contains, contains, contains, contains, containsAtLeast, first, first, firstEmpty, getContents, getHolder, getHolder, getItem, getMaxStackSize, getSize, getSlot, getSlots, getSlotType, getStorageContents, getTitle, getType, getViewers, getViewersSet, handleShiftClick, initialize, isEmpty, itemPlaceAllowed, itemShiftClickAllowed, iterator, iterator, remove, remove, removeItem, removeItemAnySlot, removeItemStack, removeViewer, setContents, setMaxStackSize, setStorageContents, setTitle, toString, tryToFillSlots
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.bukkit.inventory.Inventory
addItem, all, all, clear, clear, close, contains, contains, contains, contains, containsAtLeast, first, first, firstEmpty, getContents, getHolder, getHolder, getItem, getMaxStackSize, getSize, getStorageContents, getType, getViewers, isEmpty, iterator, iterator, remove, remove, removeItem, removeItemAnySlot, setContents, setMaxStackSize, setStorageContents
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
GlowEnchantingInventory
Creates an instance for an enchanting table.- Parameters:
location
- the enchanting table's locationplayer
- 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 interfaceorg.bukkit.inventory.EnchantingInventory
-
setItem
public void setItem(int index, org.bukkit.inventory.ItemStack item) - Specified by:
setItem
in interfaceorg.bukkit.inventory.Inventory
- Overrides:
setItem
in classGlowInventory
-
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 classGlowInventory
- Returns:
- The numbers of slots
-
getItem
public org.bukkit.inventory.ItemStack getItem()- Specified by:
getItem
in interfaceorg.bukkit.inventory.EnchantingInventory
-
getSecondary
public org.bukkit.inventory.ItemStack getSecondary()- Specified by:
getSecondary
in interfaceorg.bukkit.inventory.EnchantingInventory
-
setSecondary
public void setSecondary(org.bukkit.inventory.ItemStack itemStack) - Specified by:
setSecondary
in interfaceorg.bukkit.inventory.EnchantingInventory
-
getLocation
public org.bukkit.Location getLocation()- Specified by:
getLocation
in interfaceorg.bukkit.inventory.Inventory
- Overrides:
getLocation
in classGlowInventory
-