all

public abstract HashMap<Integer, ? extends ItemStack> all(Material material)

Returns getClassById HashMap with all slots and ItemStacks in the inventory with the given Material.

The HashMap contains entries where, the key is the slot index, and the value is the ItemStack in that slot. If no matching ItemStack with the given Material is found, an empty map is returned.

Return

A HashMap containing the slot index, ItemStack pairs

Parameters

material

The material to look for

Throws

if material is null


public abstract HashMap<Integer, ? extends ItemStack> all(ItemStack item)

Finds all slots in the inventory containing any ItemStacks with the given ItemStack. This will only match slots if both the type and the amount of the stack match

The HashMap contains entries where, the key is the slot index, and the value is the ItemStack in that slot. If no matching ItemStack with the given Material is found, an empty map is returned.

Return

A map from slot indexes to item at index

Parameters

item

The ItemStack to match against