Class SingleWindow
java.lang.Object
de.studiocode.invui.window.impl.BaseWindow
de.studiocode.invui.window.impl.single.SingleWindow
- Direct Known Subclasses:
AnvilWindow,CartographyWindow,SimpleWindow
A
Window that just uses the top Inventory.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSingleWindow(UUID viewerUUID, net.md_5.bungee.api.chat.BaseComponent[] title, GUI gui, org.bukkit.inventory.Inventory inventory, boolean initItems, boolean closeable, boolean removeOnClose) -
Method Summary
Modifier and TypeMethodDescriptiongetGui()getGuiAt(int index) GUI[]getGuis()Gets the underlyingGUIs.org.bukkit.inventory.Inventory[]Gets the underlyingInventorys.protected SlotElementgetSlotElement(int index) voidhandleClick(org.bukkit.event.inventory.InventoryClickEvent event) protected voidvoidhandleCursorCollect(org.bukkit.event.inventory.InventoryClickEvent event) A method called by theWindowManagerto notify theWindowthat aPlayeris trying to collectItemStackto the cursor by double-clicking in the player inventory.voidhandleItemShift(org.bukkit.event.inventory.InventoryClickEvent event) A method called by theWindowManagerto notify theWindowthatItemStacks have been shift-clicked from the lowerInventoryto thisWindowprotected voidvoidhandleSlotElementUpdate(GUI child, int slotIndex) Called by the childGUIto report an update of aSlotElement.voidhandleViewerDeath(org.bukkit.event.entity.PlayerDeathEvent event) A method called by theWindowManagerto notify theWindowthat it's viewer has died.protected voidprotected voidsetInvItem(int slot, org.bukkit.inventory.ItemStack itemStack) Methods inherited from class de.studiocode.invui.window.impl.BaseWindow
addCloseHandler, changeTitle, changeTitle, close, closeForViewer, getCurrentViewer, getItemSlotElements, getViewer, getViewerUUID, getVISlotElements, handleClose, handleDrag, handleItemProviderUpdate, handleOpen, handleVirtualInventoryUpdate, isCloseable, isClosed, redrawItem, redrawItem, register, removeCloseHandler, setCloseable, show
-
Field Details
-
inventory
protected org.bukkit.inventory.Inventory inventory
-
-
Constructor Details
-
SingleWindow
-
-
Method Details
-
initItems
protected void initItems() -
setInvItem
protected void setInvItem(int slot, org.bukkit.inventory.ItemStack itemStack) - Specified by:
setInvItemin classBaseWindow
-
handleOpened
protected void handleOpened()- Specified by:
handleOpenedin classBaseWindow
-
handleClosed
protected void handleClosed()- Specified by:
handleClosedin classBaseWindow
-
handleSlotElementUpdate
Description copied from interface:GUIParentCalled by the childGUIto report an update of aSlotElement.- Parameters:
child- The childGUIwhoseSlotElementhas changedslotIndex- The slot index of the changedSlotElementin the childGUI
-
handleClick
public void handleClick(org.bukkit.event.inventory.InventoryClickEvent event) Description copied from interface:Window- Parameters:
event- TheInventoryClickEventassociated with this action.
-
handleItemShift
public void handleItemShift(org.bukkit.event.inventory.InventoryClickEvent event) Description copied from interface:WindowA method called by theWindowManagerto notify theWindowthatItemStacks have been shift-clicked from the lowerInventoryto thisWindow- Parameters:
event- TheInventoryClickEventassociated with this action.
-
handleCursorCollect
public void handleCursorCollect(org.bukkit.event.inventory.InventoryClickEvent event) Description copied from interface:WindowA method called by theWindowManagerto notify theWindowthat aPlayeris trying to collectItemStackto the cursor by double-clicking in the player inventory. This method is not called when the player inventory is also part of theWindow. (MergedWindow)- Parameters:
event- TheInventoryClickEventassociated with this action.
-
getGuiAt
- Specified by:
getGuiAtin classBaseWindow
-
getSlotElement
- Specified by:
getSlotElementin classBaseWindow
-
handleViewerDeath
public void handleViewerDeath(org.bukkit.event.entity.PlayerDeathEvent event) Description copied from interface:WindowA method called by theWindowManagerto notify theWindowthat it's viewer has died.- Parameters:
event- ThePlayerDeathEventassociated with this action.
-
getInventories
public org.bukkit.inventory.Inventory[] getInventories()Description copied from interface:WindowGets the underlyingInventorys.- Returns:
- The underlying
Inventorys.
-
getGuis
Description copied from interface:WindowGets the underlyingGUIs.- Returns:
- The underlying
GUIs.
-
getGui
-