com.quartercode.quarterbukkit.api
Class InventoryUtil

java.lang.Object
  extended by com.quartercode.quarterbukkit.api.InventoryUtil

public class InventoryUtil
extends java.lang.Object

Class for handling several Inventory-things easier.


Method Summary
static boolean contains(org.bukkit.inventory.Inventory inventory, org.bukkit.inventory.ItemStack itemStack)
          Returns if the given Inventory contains at least one ItemStack which equals the given ItemStack.
static boolean containsAtLeast(org.bukkit.inventory.Inventory inventory, org.bukkit.inventory.ItemStack itemStack, int minimumAmount)
          Returns if the given Inventory contains at least the given amount of ItemStacks which equal the given ItemStack.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

contains

public static boolean contains(org.bukkit.inventory.Inventory inventory,
                               org.bukkit.inventory.ItemStack itemStack)
Returns if the given Inventory contains at least one ItemStack which equals the given ItemStack.

Parameters:
inventory - The Inventory to check.
itemStack - The ItemStack to check.
Returns:
If the given Inventory contains at least one ItemStack which equals the given ItemStack.

containsAtLeast

public static boolean containsAtLeast(org.bukkit.inventory.Inventory inventory,
                                      org.bukkit.inventory.ItemStack itemStack,
                                      int minimumAmount)
Returns if the given Inventory contains at least the given amount of ItemStacks which equal the given ItemStack.

Parameters:
inventory - The Inventory to check.
itemStack - The ItemStack to check.
Returns:
If the given Inventory contains at least the given amount of ItemStacks which equal the given ItemStack.