Hey guys, i am adding items in player inventory by : $player->getInventory()->addItem(Item::get($id)); I want to add item that won't be shown in players hotbar but it will be shown into inventory. Thank you for attention. I need your help, please^-^
He does not want it in the hotbar, please double check the original message. But it would be $player->getInventory()->setSlot(...);
as "Minecraft Gamepedia: Inventory" says that first PlayerInventory::getHotbarSize() slots are slots for hotbar.