$block = Item::get(Item::DIAMOND_BLOCK, 0, 1); $customData = $block->getCustomBlockData();
$customItem = Item::get(5000, 1, 1); $customData = $customItem->getCustomBlockData();In the first example, we retrieve the custom data from a Diamond Block item. In the second example, we retrieve the custom data from a custom item with ID 5000. Package Library: The getCustomBlockData() method is part of the PocketMine Item package library. It is used to manipulate items in the PocketMine-MP Minecraft server software.