I need to know the number of the object , for example : if($p->getInventory()->getItemInHand()->getId() === 1){ $p->sendMessage("hmm okay"); return false; } and I need to accomplish something if the stone at count 10
If you are trying to get the item of a hand of a player it should be: PHP: $player->getInventory()->getItemInHand()->getCount(); To learn more about how to do something with a player's inventory, look here: https://github.com/PocketMine/PocketMine-MP/blob/master/src/pocketmine/inventory/PlayerInventory.php No, you should take your own advice and read the "docs". It's the "source code", not the docs. Please make sure you know what you're doing before replying.