writeInventory added; getPlayerByName needs constratins