Hey I have a problem with addItem That don't add Item In Inventory i explain If the hot bar is not empty that add It When the hot bar That dont add item directly into inventory i try it with setContents but even problem My code PHP: if($player->getInventory()->contains(Item::get(264,0,5))){ $player->getInventory()->removeItem(Item::get(264,0,5));$player->getInventory()->addItem(Item::get(49,0,10));[PHP/]
what is the problem now? that the item doesn't get removed/added when in the hotbar? or the other way around?
No i dont explain correctly if the hot bar is full the item will dont add in inventory but with not error i dont know why.