Class TradeWindow
java.lang.Object
Kyu.GuiAPI_Redone.Window.Openable
Kyu.GuiAPI_Redone.Window.Window
Kyu.GuiAPI_Redone.Window.WindowImpl.ChestWindow
Kyu.GuiAPI_Redone.Window.WindowImpl.TradeWindow.TradeWindow
- All Implemented Interfaces:
org.bukkit.inventory.InventoryHolder
-
Field Summary
Fields inherited from class Kyu.GuiAPI_Redone.Window.Openable
disableClickEvent, gui, isIgnoreCloseEvent, onClose, preventClose, unregisterOnClose
-
Constructor Summary
ConstructorsConstructorDescriptionTradeWindow
(TradeWindowHolder holder, org.bukkit.entity.Player player, String title) Creates a new Windows able to display the trades -
Method Summary
Modifier and TypeMethodDescriptionint
Gets the next free slot on the left hand side of the windoworg.bukkit.entity.Player
void
Reloads all the Items in the inventory, as well as sets the toolbar and the spacer againvoid
Sets the spacer inbetween the trade offersvoid
Sets the toolbar at the bottom of the window againMethods inherited from class Kyu.GuiAPI_Redone.Window.WindowImpl.ChestWindow
getRows, open, set
Methods inherited from class Kyu.GuiAPI_Redone.Window.Window
addItem, clearItems, getInventory, getItem, getItems, 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
-
TradeWindow
Creates a new Windows able to display the trades- Parameters:
holder
-TradeWindowHolder
which controls the tradeplayer
- the Player that will view this windowtitle
- the title of the window, will be color translated
-
-
Method Details
-
reloadItems
public void reloadItems()Reloads all the Items in the inventory, as well as sets the toolbar and the spacer again -
setToolbar
public void setToolbar()Sets the toolbar at the bottom of the window again -
setSpacer
public void setSpacer()Sets the spacer inbetween the trade offers -
getNextFreeSlot
public int getNextFreeSlot()Gets the next free slot on the left hand side of the window- Overrides:
getNextFreeSlot
in classWindow
-
getPlayer
public org.bukkit.entity.Player getPlayer()- Returns:
- The Player that views this inventory
-