pocketmine\inventory\BaseInventory::remove PHP Method

remove() public method

public remove ( Item $item, $send = true )
$item pocketmine\item\Item
    public function remove(Item $item, $send = true)
    {
        $checkDamage = $item->getDamage() === null ? false : true;
        $checkTags = $item->getCompoundTag() === null ? false : true;
        $checkCount = $item->getCount() === null ? false : true;
        foreach ($this->getContents() as $index => $i) {
            if ($item->equals($i, $checkDamage, $checkTags, $checkCount)) {
                $this->clear($index, $send);
                break;
            }
        }
    }