java.lang.Object
city.norain.slimefun4.holder.SlimefunInventoryHolder
me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.ChestMenu
All Implemented Interfaces:
org.bukkit.inventory.InventoryHolder
Direct Known Subclasses:
BlockMenuPreset, DirtyChestMenu

@Deprecated public class ChestMenu extends SlimefunInventoryHolder
Deprecated.
An old remnant of CS-CoreLib. This will be removed once we updated everything. Don't look at the code, it will be gone soon, don't worry.
  • Constructor Details

    • ChestMenu

      public ChestMenu(String title)
      Deprecated.
      Creates a new ChestMenu with the specified Title
      Parameters:
      title - The title of the Menu
    • ChestMenu

      public ChestMenu(String title, int size)
      Deprecated.
  • Method Details

    • setPlayerInventoryClickable

      public ChestMenu setPlayerInventoryClickable(boolean clickable)
      Deprecated.
      Toggles whether Players can access there Inventory while viewing this Menu
      Parameters:
      clickable - Whether the Player can access his Inventory
      Returns:
      The ChestMenu Instance
    • isPlayerInventoryClickable

      public boolean isPlayerInventoryClickable()
      Deprecated.
      Returns whether the Player's Inventory is accessible while viewing this Menu
      Returns:
      Whether the Player Inventory is clickable
    • setEmptySlotsClickable

      public ChestMenu setEmptySlotsClickable(boolean emptyClickable)
      Deprecated.
      Toggles whether Players can click the empty menu slots while viewing this Menu
      Parameters:
      emptyClickable - Whether the Player can click empty slots
      Returns:
      The ChestMenu Instance
    • isEmptySlotsClickable

      public boolean isEmptySlotsClickable()
      Deprecated.
      Returns whether the empty menu slots are clickable while viewing this Menu
      Returns:
      Whether the empty menu slots are clickable
    • addPlayerInventoryClickHandler

      public ChestMenu addPlayerInventoryClickHandler(ChestMenu.MenuClickHandler handler)
      Deprecated.
      Adds a ClickHandler to ALL Slots of the Player's Inventory
      Parameters:
      handler - The MenuClickHandler
      Returns:
      The ChestMenu Instance
    • addItem

      public ChestMenu addItem(int slot, org.bukkit.inventory.ItemStack item)
      Deprecated.
      Adds an Item to the Inventory in that Slot
      Parameters:
      slot - The Slot in the Inventory
      item - The Item for that Slot
      Returns:
      The ChestMenu Instance
    • addItem

      public ChestMenu addItem(int slot, org.bukkit.inventory.ItemStack item, ChestMenu.MenuClickHandler clickHandler)
      Deprecated.
      Adds an Item to the Inventory in that Slot as well as a Click Handler
      Parameters:
      slot - The Slot in the Inventory
      item - The Item for that Slot
      clickHandler - The MenuClickHandler for that Slot
      Returns:
      The ChestMenu Instance
    • getItemInSlot

      public org.bukkit.inventory.ItemStack getItemInSlot(int slot)
      Deprecated.
      Returns the ItemStack in that Slot
      Parameters:
      slot - The Slot in the Inventory
      Returns:
      The ItemStack in that Slot
    • addMenuClickHandler

      public ChestMenu addMenuClickHandler(int slot, ChestMenu.MenuClickHandler handler)
      Deprecated.
      Executes a certain Action upon clicking an Item in the Menu
      Parameters:
      slot - The Slot in the Inventory
      handler - The MenuClickHandler
      Returns:
      The ChestMenu Instance
    • addMenuOpeningHandler

      public ChestMenu addMenuOpeningHandler(ChestMenu.MenuOpeningHandler handler)
      Deprecated.
      Executes a certain Action upon opening this Menu
      Parameters:
      handler - The MenuOpeningHandler
      Returns:
      The ChestMenu Instance
    • addMenuCloseHandler

      public ChestMenu addMenuCloseHandler(ChestMenu.MenuCloseHandler handler)
      Deprecated.
      Executes a certain Action upon closing this Menu
      Parameters:
      handler - The MenuCloseHandler
      Returns:
      The ChestMenu Instance
    • build

      @Deprecated public ChestMenu build()
      Deprecated.
      Finishes the Creation of the Menu
      Returns:
      The ChestMenu Instance
    • getContents

      public org.bukkit.inventory.ItemStack[] getContents()
      Deprecated.
      Returns an Array containing the Contents of this Inventory
      Returns:
      The Contents of this Inventory
    • addViewer

      public void addViewer(@Nonnull UUID uuid)
      Deprecated.
    • removeViewer

      public void removeViewer(@Nonnull UUID uuid)
      Deprecated.
    • contains

      public boolean contains(@Nonnull org.bukkit.entity.Player viewer)
      Deprecated.
    • reset

      public void reset(boolean update)
      Deprecated.
      Resets this ChestMenu to a Point BEFORE the User interacted with it
    • replaceExistingItem

      public void replaceExistingItem(int slot, org.bukkit.inventory.ItemStack item)
      Deprecated.
      Modifies an ItemStack in an ALREADY OPENED ChestMenu
      Parameters:
      slot - The Slot of the Item which will be replaced
      item - The new Item
    • open

      public void open(org.bukkit.entity.Player... players)
      Deprecated.
      Opens this Menu for the specified Player/s
      Parameters:
      players - The Players who will see this Menu
    • getMenuClickHandler

      public ChestMenu.MenuClickHandler getMenuClickHandler(int slot)
      Deprecated.
      Returns the MenuClickHandler which was registered for the specified Slot
      Parameters:
      slot - The Slot in the Inventory
      Returns:
      The MenuClickHandler registered for the specified Slot
    • getMenuCloseHandler

      public ChestMenu.MenuCloseHandler getMenuCloseHandler()
      Deprecated.
      Returns the registered MenuCloseHandler
      Returns:
      The registered MenuCloseHandler
    • getMenuOpeningHandler

      public ChestMenu.MenuOpeningHandler getMenuOpeningHandler()
      Deprecated.
      Returns the registered MenuOpeningHandler
      Returns:
      The registered MenuOpeningHandler
    • getPlayerInventoryClickHandler

      public ChestMenu.MenuClickHandler getPlayerInventoryClickHandler()
      Deprecated.
      Returns the registered MenuClickHandler for Player Inventories
      Returns:
      The registered MenuClickHandler
    • toInventory

      public org.bukkit.inventory.Inventory toInventory()
      Deprecated.
      Converts this ChestMenu Instance into a normal Inventory
      Returns:
      The converted Inventory
    • getSize

      public int getSize()
      Deprecated.
    • setSize

      public ChestMenu setSize(int size)
      Deprecated.
    • isSizeAutomaticallyInferred

      public boolean isSizeAutomaticallyInferred()
      Deprecated.
    • locked

      public boolean locked()
      Deprecated.
    • lock

      public void lock()
      Deprecated.
    • unlock

      public void unlock()
      Deprecated.