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
ConstructorsConstructorDescriptionGlowEnchantingInventory(org.bukkit.Location location, GlowPlayer player) Creates an instance for an enchanting table. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the number of bookshelf blocks that are raising this enchanting table's level.org.bukkit.inventory.ItemStackgetItem()org.bukkit.LocationintGets the number of slots in this inventory according to the protocol.org.bukkit.inventory.ItemStackvoidonPlayerEnchant(int clicked) voidsetItem(int index, org.bukkit.inventory.ItemStack item) voidsetItem(org.bukkit.inventory.ItemStack item) voidsetSecondary(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, tryToFillSlotsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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, setStorageContentsMethods 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:
setItemin interfaceorg.bukkit.inventory.EnchantingInventory
-
setItem
public void setItem(int index, org.bukkit.inventory.ItemStack item) - Specified by:
setItemin interfaceorg.bukkit.inventory.Inventory- Overrides:
setItemin classGlowInventory
-
getRawSlots
public int getRawSlots()Description copied from class:GlowInventoryGets the number of slots in this inventory according to the protocol.Some inventories have 0 slots in the protocol, despite having slots.
- Overrides:
getRawSlotsin classGlowInventory- Returns:
- The numbers of slots
-
getItem
public org.bukkit.inventory.ItemStack getItem()- Specified by:
getItemin interfaceorg.bukkit.inventory.EnchantingInventory
-
getSecondary
public org.bukkit.inventory.ItemStack getSecondary()- Specified by:
getSecondaryin interfaceorg.bukkit.inventory.EnchantingInventory
-
setSecondary
public void setSecondary(org.bukkit.inventory.ItemStack itemStack) - Specified by:
setSecondaryin interfaceorg.bukkit.inventory.EnchantingInventory
-
getLocation
public org.bukkit.Location getLocation()- Specified by:
getLocationin interfaceorg.bukkit.inventory.Inventory- Overrides:
getLocationin classGlowInventory
-