Code: $e->getPlayer()->setHealth($e->getPlayer()->getHealth()+1); Server::getInstance()->broadcastMessage($e->getPlayer()->getInventory()->getItemInHand()->getCount()." gold"); $e->getPlayer()->getInventory()->getItemInHand()->setCount($e->getPlayer()->getInventory()->getItemInHand()->getCount()-1); Server::getInstance()->broadcastMessage($e->getPlayer()->getInventory()->getItemInHand()->getCount()." gold"); Is this function not available or am i using it wrong?
Yeah, the player is holding 11 gold, it should set the 11 to 11-1 but instead it is still 11. Maybe the inventory is changed but not updating...