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 TypeMethodDescriptionintGets the next free slot on the left hand side of the windoworg.bukkit.entity.PlayervoidReloads all the Items in the inventory, as well as sets the toolbar and the spacer againvoidSets the spacer inbetween the trade offersvoidSets the toolbar at the bottom of the window againMethods inherited from class Kyu.GuiAPI_Redone.Window.WindowImpl.ChestWindow
getRows, open, setMethods inherited from class Kyu.GuiAPI_Redone.Window.Window
addItem, clearItems, getInventory, getItem, getItems, getTitle, refreshInventory, removeItem, setInventory, setItemMethods 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-TradeWindowHolderwhich 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:
getNextFreeSlotin classWindow
-
getPlayer
public org.bukkit.entity.Player getPlayer()- Returns:
- The Player that views this inventory
-