mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-13 03:05:52 -07:00
#540: Add Inventory#isEmpty()
By: Parker Hawke <hawkeboyz2@hotmail.com>
This commit is contained in:
@@ -288,6 +288,14 @@ public interface Inventory extends Iterable<ItemStack> {
|
|||||||
*/
|
*/
|
||||||
public int firstEmpty();
|
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.
|
* Removes all stacks in the inventory matching the given material.
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user