Package com.plotsquared.core.util
Class InventoryUtil
java.lang.Object
com.plotsquared.core.util.InventoryUtil
This class is only used by internal functions, for most cases use the PlotInventory class
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
close
(PlotInventory inv) abstract PlotItemStack[]
getItems
(PlotPlayer<?> player) abstract boolean
isOpen
(PlotInventory plotInventory) abstract void
open
(PlotInventory inv) void
setItem
(PlotInventory plotInventory, int index, PlotItemStack item) Attempts to set an item into aPlotInventory
abstract boolean
setItemChecked
(PlotInventory plotInventory, int index, PlotItemStack item) Attempts to set an item into aPlotInventory
while also checking the existence of the material
-
Constructor Details
-
InventoryUtil
public InventoryUtil()
-
-
Method Details
-
open
-
close
-
setItemChecked
Attempts to set an item into aPlotInventory
while also checking the existence of the material- Parameters:
plotInventory
- The inventory where the item should be placedindex
- The index where to place the itemitem
- 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
Attempts to set an item into aPlotInventory
- Parameters:
plotInventory
- The inventory where the item should be placedindex
- The index where to place the itemitem
- The item to place into the inventory- See Also:
-
getItems
-
isOpen
-