All Implemented Interfaces:
org.bukkit.inventory.InventoryHolder

public class TradeWindow extends ChestWindow
  • Constructor Details

    • TradeWindow

      public TradeWindow(TradeWindowHolder holder, org.bukkit.entity.Player player, String title)
      Creates a new Windows able to display the trades
      Parameters:
      holder - TradeWindowHolder which controls the trade
      player - the Player that will view this window
      title - 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 class Window
    • getPlayer

      public org.bukkit.entity.Player getPlayer()
      Returns:
      The Player that views this inventory