pocketmine\Player::getCreativeItemIndex PHP Method

getCreativeItemIndex() public method

public getCreativeItemIndex ( Item $item ) : integer
$item pocketmine\item\Item
return integer
    public function getCreativeItemIndex(Item $item) : int
    {
        foreach ($this->personalCreativeItems as $i => $d) {
            if ($item->equals($d, !$item->isTool())) {
                return $i;
            }
        }
        return -1;
    }
Player