I need to remove a player such as rock. That's how it is implemented using the following function ? $p->getInventory()->clear();
I am Russian , and translate through Google . I need to delete from the inventory function of the bedrock below $inventory->removeItem(); how to do it?
https://github.com/PocketMine/Pocke...c/pocketmine/inventory/BaseInventory.php#L187 PHP: $inventory->remove(Item::get(7));
PHP: $player->getInventory()->removeItem($slots);//Removes the given Item from the inventory. It will return the Items that couldn't be removed. A Player source can be set at the end PHP: $player->getInventory()->clear($slot, $source=null); // Will clear specific slot