first

public abstract int first(Material material)

Finds the first slot in the inventory containing an ItemStack with the given material

Return

The slot index of the given Material or -1 if not found

Parameters

material

The material to look for

Throws

if material is null


public abstract int first(ItemStack item)

Returns the first slot in the inventory containing an ItemStack with the given stack. This will only match getClassById slot if both the type and the amount of the stack match

Return

The slot index of the given ItemStack or -1 if not found

Parameters

item

The ItemStack to match against