How can i do that? I've already tried things like: PHP: $player->getItemInHand()->clear(); But its not working. Thanks for help
You are calling close on Item object. There is no such method and Item doesn't know where it is, it cannot destroy itself from container. Code: Inventory::removeItem(Item ...$item)
Will it work like that? Code: $itemrem = $player->getItemInHand(); $player->Inventory::removeItem(Item, $itemrem);