public class GlowAnvilInventory extends GlowInventory implements org.bukkit.inventory.AnvilInventory
| Constructor and Description |
|---|
GlowAnvilInventory(org.bukkit.inventory.InventoryHolder holder)
Creates an instance for the given player.
|
| Modifier and Type | Method and Description |
|---|---|
org.bukkit.inventory.ItemStack |
getFirstItem() |
org.bukkit.inventory.ItemStack |
getForged()
Returns the item that will result when this anvil is applied to the currently loaded items,
combining them, provided that two items which can be combined are loaded.
|
int |
getRawSlots()
Gets the number of slots in this inventory according to the protocol.
|
String |
getRenameText() |
int |
getRepairCost() |
org.bukkit.inventory.ItemStack |
getResultItem() |
org.bukkit.inventory.ItemStack |
getSecondItem() |
void |
handleShiftClick(GlowPlayer player,
org.bukkit.inventory.InventoryView view,
int clickedSlot,
org.bukkit.inventory.ItemStack clickedItem)
Handle a shift click in this inventory by the specified player.
|
void |
setItem(int index,
org.bukkit.inventory.ItemStack item) |
void |
setRenameText(String name)
Sets the name of the next item to be modified on this anvil.
|
void |
setRepairCost(int repairCost) |
addItem, addItemStack, addViewer, all, all, all, clear, clear, consumeItem, consumeItem, contains, contains, contains, contains, contains, contains, containsAtLeast, first, first, first, firstEmpty, getContents, getHolder, getItem, getLocation, getMaxStackSize, getName, getSize, getSlot, getSlots, getSlotType, getStorageContents, getTitle, getType, getViewers, getViewersSet, initialize, itemPlaceAllowed, itemShiftClickAllowed, iterator, iterator, remove, remove, remove, removeItem, removeItemStack, removeViewer, setContents, setMaxStackSize, setStorageContents, setTitle, toString, tryToFillSlotsclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddItem, all, all, all, clear, clear, contains, contains, contains, contains, contains, contains, containsAtLeast, first, first, first, firstEmpty, getContents, getHolder, getItem, getLocation, getMaxStackSize, getName, getSize, getStorageContents, getTitle, getType, getViewers, iterator, iterator, remove, remove, remove, removeItem, setContents, setMaxStackSize, setStorageContentsforEach, spliteratorpublic GlowAnvilInventory(org.bukkit.inventory.InventoryHolder holder)
holder - the playerpublic int getRawSlots()
GlowInventorySome inventories have 0 slots in the protocol, despite having slots.
getRawSlots in class GlowInventorypublic org.bukkit.inventory.ItemStack getFirstItem()
public org.bukkit.inventory.ItemStack getSecondItem()
public org.bukkit.inventory.ItemStack getResultItem()
public void handleShiftClick(GlowPlayer player, org.bukkit.inventory.InventoryView view, int clickedSlot, org.bukkit.inventory.ItemStack clickedItem)
GlowInventoryThe default implementation distributes items from the right to the left and from the bottom to the top.
handleShiftClick in class GlowInventoryplayer - The player who clickedview - The inventory view in which was clickedclickedSlot - The slot in the viewclickedItem - The item at which was clickedpublic void setItem(int index,
org.bukkit.inventory.ItemStack item)
setItem in interface org.bukkit.inventory.InventorysetItem in class GlowInventorypublic org.bukkit.inventory.ItemStack getForged()
public void setRenameText(String name)
name - the item namepublic String getRenameText()
getRenameText in interface org.bukkit.inventory.AnvilInventorypublic int getRepairCost()
getRepairCost in interface org.bukkit.inventory.AnvilInventorypublic void setRepairCost(int repairCost)
setRepairCost in interface org.bukkit.inventory.AnvilInventoryCopyright © 2021. All rights reserved.