I give a player items, when he killed someone. But only he item in the killers hand doesn't update. Does someone know why? My code: PHP: $killer->getInventory()->setItem(0, $item);$killer->getInventory()->setItem(1, $item);
Do I need to send something to update the item in the killers hand? PHP: $killer->getInventory()->clearAll();$item = Item::get(271, 0, 1);$killer->getInventory()->setItem(0, $item); $killer->getInventory()->setItem(1, $item);
If you want to, you can do that, tho your code must automatically do it. PHP: $player->getInventory()->sendSlot($slotnumber, $player); Where $slotnumber is the slot number.