Class InventoryMonitor

java.lang.Object
net.glowstone.inventory.InventoryMonitor

public final class InventoryMonitor extends Object
Tracker for when items in an inventory are changed.
  • 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

      public List<InventoryMonitor.Entry> 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

      public String getType()
      Get the network type ID of this inventory view.
      Returns:
      The type id.