Minecraft method in Eclipse to specify the number of items in the inventory slot?

La
5

I'm currently looking for a method that returns the number of items in a slot as return value.

Lo

Itemstack.getAmount ()

La

How to use this method

Lo

Player.getInventory ()

La

So player.getinventory (). Itemstack.getamount

Lo

Yeah just about.