When I take a single player world from a friend who was hosting the LAN server I have their player data instead of my UI. Is it possible to start with mine and then host? Also, in a way in which the friend doesn't lose their data when they rejoin?
re Kyle Yee's answer, the solution did not work for me initially. Turned out because I'd already loaded the save once, player B's playerdata had been overwritten by player A's. So deleting Player under level.data made no apparent difference.
Solution worked fine after I copied the save afresh and deleted Player before attempting to load the save. Don't know if it made any difference, but I did the same under level.dat_old.
As an aside, the following can be used to edit DAT files. NBTExplorer
You could try this solution that was posted in a couple of other places: https://gaming.stackexchange.com/a/197693/228410
But in cases like mine, this did not work. In which case, you would have to use a dedicated server to store playerdata for each player's UUID in the correct manner.