Well, the title says it all. I defined $handItem by something like PHP: $handItem = $sender->getInventory()->getItemInHand()//I don't know if this is the right way to define it, but you get the idea. . I would like to know how would I get how many items I have in my hand, and the item ID of it.
https://github.com/PocketMine/Pocke.../pocketmine/inventory/PlayerInventory.php#L83 The getItemInHand() function returns an instance of pocketmine\item\Item. Now look at the Item class declaration. https://github.com/PocketMine/PocketMine-MP/blob/master/src/pocketmine/item/Item.php#L1443 https://github.com/PocketMine/PocketMine-MP/blob/master/src/pocketmine/item/Item.php#L1447 https://github.com/PocketMine/PocketMine-MP/blob/master/src/pocketmine/item/Item.php#L1419 It has three public functions that match what you are asking for. getId() getDamage() getCount() Next time before asking, try browsing the source code or documentation to find the answer yourself.