Assuming $chest is an instanceof Chest (the title): PHP: $chest->getInventory()->getItem(9); Can people please learn reading the source code....
ooh whops, i didn't see it their my bad (https://github.com/pmmp/PocketMine-MP/blob/master/src/pocketmine/inventory/Inventory.php#L53)