Package net.glowstone.inventory
Class InventoryMonitor
java.lang.Object
net.glowstone.inventory.InventoryMonitor
Tracker for when items in an inventory are changed.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
An entry which has been changed. -
Constructor Summary
ConstructorsConstructorDescriptionInventoryMonitor
(org.bukkit.inventory.InventoryView view) Create a new monitor for the given inventory view. -
Method Summary
Modifier and TypeMethodDescriptionCheck for changes in the inventory view.org.bukkit.inventory.ItemStack[]
Get the current contents of the viewed inventory.int
getId()
The network ID of this inventory view.int
getSize()
Get the number of slots in this inventory view.getType()
Get the network type ID of this inventory view.
-
Constructor Details
-
InventoryMonitor
public InventoryMonitor(org.bukkit.inventory.InventoryView view) Create a new monitor for the given inventory view.- Parameters:
view
- The view to monitor.
-
-
Method Details
-
getChanges
Check for changes in the inventory view.- Returns:
- The list of changed items.
-
getContents
public org.bukkit.inventory.ItemStack[] getContents()Get the current contents of the viewed inventory.- Returns:
- The contents.
-
getSize
public int getSize()Get the number of slots in this inventory view.- Returns:
- The number of slots.
-
getId
public int getId()The network ID of this inventory view.- Returns:
- The id.
-
getType
Get the network type ID of this inventory view.- Returns:
- The type id.
-