Class InventoryUtil

java.lang.Object
com.plotsquared.core.util.InventoryUtil

public abstract class InventoryUtil extends Object
This class is only used by internal functions, for most cases use the PlotInventory class
  • Constructor Details

    • InventoryUtil

      public InventoryUtil()
  • Method Details

    • open

      public abstract void open(PlotInventory inv)
    • close

      public abstract void close(PlotInventory inv)
    • setItemChecked

      public abstract boolean setItemChecked(PlotInventory plotInventory, int index, PlotItemStack item)
      Attempts to set an item into a PlotInventory while also checking the existence of the material
      Parameters:
      plotInventory - The inventory where the item should be placed
      index - The index where to place the item
      item - The item to place into the inventory
      Returns:
      true if the item could be placed, false otherwise (e.g. item not available in current version)
      Since:
      6.5.0
    • setItem

      public void setItem(PlotInventory plotInventory, int index, PlotItemStack item)
      Attempts to set an item into a PlotInventory
      Parameters:
      plotInventory - The inventory where the item should be placed
      index - The index where to place the item
      item - The item to place into the inventory
      See Also:
    • getItems

      public abstract PlotItemStack[] getItems(PlotPlayer<?> player)
    • isOpen

      public abstract boolean isOpen(PlotInventory plotInventory)