#540: Add Inventory#isEmpty()

This commit is contained in:
Parker Hawke 2020-08-16 11:21:05 +10:00 committed by md_5
parent c45e2fafdd
commit bf0015ebb3
No known key found for this signature in database
GPG key ID: E8E901AC7C617C11

View file

@ -288,6 +288,14 @@ public interface Inventory extends Iterable<ItemStack> {
*/
public int firstEmpty();
/**
* Check whether or not this inventory is empty. An inventory is considered
* to be empty if there are no ItemStacks in any slot of this inventory.
*
* @return true if empty, false otherwise
*/
public boolean isEmpty();
/**
* Removes all stacks in the inventory matching the given material.
*