Class ChestWindow
java.lang.Object
Kyu.GuiAPI_Redone.Window.Openable
Kyu.GuiAPI_Redone.Window.Window
Kyu.GuiAPI_Redone.Window.WindowImpl.ChestWindow
- All Implemented Interfaces:
org.bukkit.inventory.InventoryHolder
- Direct Known Subclasses:
TradeWindow
-
Field Summary
Fields inherited from class Kyu.GuiAPI_Redone.Window.Openable
disableClickEvent, gui, isIgnoreCloseEvent, onClose, preventClose, unregisterOnClose
-
Constructor Summary
ConstructorsConstructorDescriptionChestWindow
(GUI gui, int rows, String title) Creates a new window to be used in a gui -
Method Summary
Modifier and TypeMethodDescriptionint
getRows()
void
open()
Calling directly can result inGUI
not setting the current Window correctly! UseGUI.openWindow(Kyu.GuiAPI_Redone.Window.Openable)
insteadprotected void
Places an item in the windows, without linking the item to the window, useWindow.setItem(GuiItem, int)
insteadMethods inherited from class Kyu.GuiAPI_Redone.Window.Window
addItem, clearItems, getInventory, getItem, getItems, getNextFreeSlot, getTitle, refreshInventory, removeItem, setInventory, setItem
Methods inherited from class Kyu.GuiAPI_Redone.Window.Openable
getGui, getOnClose, isDisableClickEvent, isIgnoreCloseEvent, isPreventClose, isUnregisterOnClose, setDisableClickEvent, setIgnoreCloseEvent, setOnClose, setPreventClose, setUnregisterOnClose
-
Constructor Details
-
ChestWindow
Creates a new window to be used in a gui- Parameters:
gui
- TheGUI
to userows
- The amount of Rows per Page (1 - 6)title
- The title of the Window (will be color translated)- Throws:
RowsOutOfBoundsException
- if rows are less than 1 or greater than 6
-
-
Method Details
-
open
public void open()Calling directly can result inGUI
not setting the current Window correctly! UseGUI.openWindow(Kyu.GuiAPI_Redone.Window.Openable)
instead -
set
Places an item in the windows, without linking the item to the window, useWindow.setItem(GuiItem, int)
instead -
getRows
public int getRows()- Returns:
- The amount of rows in the Window
-