/**
* Requests a list of itemstacks.
*
* @param stacks the stacks.
* @return true if they're in the inventory.
*/
public boolean checkIfRequestForItemExistOrCreate(@NotNull final ItemStack... stacks)
{
return checkIfRequestForItemExistOrCreate(Lists.newArrayList(stacks));
}
/**
* Check if any of the stacks is in the inventory.
*
* @param stacks the list of stacks.
* @return true if so.
*/
public boolean checkIfRequestForItemExistOrCreate(@NotNull final Collection<ItemStack> stacks)
{
return stacks.stream().allMatch(this::checkIfRequestForItemExistOrCreate);
}
评论区