Default singleplayer player data is always used for players opening world
The bug
For singleplayer worlds the player data is written to the level.dat file as well (called "default player data" in the following) and always used when someone opens the world. This creates the following two unwanted situations.
Cannot start with empty inventory in a world of someone else
Because the default player data is always used you cannot play in the world of someone else with new player data but instead start where the player who last played left and have the same items.
Default player data is used even if player data exists after playing in LAN
When you played in LAN before and an entry in the playerdata folder exists for a player the default player data is used anyways.
Imagine the following: Player 1 hosted the world and player 2 joined. After that player 2 opens the world, even though a player data entry exists he gets player 1's player data (=default player data) which even overwrites player 2's player data entry when he leaves the world.
Outdated default player data is used after loading world on a dedicated server
When a singleplayer world is loaded by a dedicated server and the default player data player joins, their playerdata entry is updated, but their default player data is not. Therefore when they load the world in singleplayer again, they have the old outdated player data.
Possible solution
See this reddit post for a discussion.
Have the game perform these steps when loading a world:
- If the default player data exists and for the same UUID a playerdata entry exists, overwrite the default player data with that. This is needed for the case where a singleplayer world was loaded by a dedicated server and therefore the default player data became outdated.
Then continue with the following steps: - If the default player data exists, but the UUID does not match the UUID of the current player:
Possibly offer a checkbox to determine whether the default player data should be overwritten by the current player.
Provide these options:- Offer to continue where that player last left
- Offer to use own player data (in case playerdata entry exists) or otherwise with empty inventory at world spawn
- Otherwise: If the default player data exists and the UUID matches the UUID of the current player, use that data
- Otherwise: If no default player data exists use the matching playerdata entry or, in case that does not exist, start with an empty inventory at world spawn
Workaround
Keep in mind that this is a bug tracker and not a discussion forum or a help desk. For questions, ask for example on reddit, the Minecraft Forum, or on other platforms.
Create a backup of your world before trying the following workaround. Otherwise you might loose data or your world can become corrupted.
The following steps require an NBT editor. Make sure it is up to date and supports changes to NBT structure introduced in the latest versions. You can use for example NBTExplorer version 2.8.0(+).
- Open the level.dat file of the world with an NBT editor
- Delete the Data > Player entry
- Save the file
Linked Issues
is blocked by1
is duplicated by24
- Unresolved
Mask3D_WOLFNathan Fielder
- 61
- 35
- Confirmed
Normal
- Platform
- Player
- duplication playerdata
1.4.2 - 1.20.4
1.4.2 1.4.6 1.7.4 14w05b 14w06b 14w07a 14w08a 1.7.10 14w32d 1.8.1-pre3 1.9.4 1.10 1.10.1 1.10.2 1.11.2 1.12.1 1.12.2 1.13-pre6 18w30b 1.13.2 1.14-pre2 1.14-pre3 1.14-pre4 1.14-pre5 1.14.4 1.15.2 20w13b 1.16-rc1 1.16 1.16.1 20w27a 20w28a 1.16.2 1.16.4 1.16.5 21w06a 21w07a 21w08b 21w11a 21w14a 1.17-rc2 1.17 1.19.3 23w03a 23w04a 23w05a 23w06a 1.20.4
Created Issue:
There is a duplicate bug with ender chests in LAN world.
Player 1 places a diamond in a enderchest. Then player 2 logs on the same computer and opens up the world, they now have exact same inventories including enderchest. Both players log onto the LAN world where the open their enderchest and can both get a diamond. This can be repeated and can result in stacks of diamonds.
Environment
MAC OS X 10.8.2. Java 7 JDK.
Linked Issues
is cloned by1
TRASH-6647
- Unresolved
- Open
- Public
- Unconfirmed
- Survival
- Enderchest LAN World bug duplicate
- 1.4.2
relates to
is duplicated by
is duplicated by
relates to
relates to
is duplicated by
is duplicated by
relates to
is cloned by
MC-44213
is cloned by
TRASH-6647
is duplicated by
Is this still a concern in the latest Minecraft version 14w08a? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.
is duplicated by
There is a duplicatebug with ender chests in LAN world.Duplication bug with ender chests in LAN world
is duplicated by
Player 1 places a diamond in a enderchest. Then player 2 logs on the same computer and opens up the world, they now have exact same inventories including enderchest. Both players log onto the LAN world where they open their enderchest and can both get a diamond. This can be repeated and can result in stacks of diamonds.
Duplication bug with ender chests or inventory in LANworldDefault singleplayer player data is always used for players opening world
Player 1 places a diamond in a enderchest. Then player 2 logs on the same computer and opens up the world, they now have exact same inventories including enderchest. Both players log onto the LAN world where they open their enderchest and can both get a diamond. This can be repeated and can result in stacks of diamonds.
The bug
For singleplayer worlds the player data is written to the level.dat file as well (called "default player data" in the following) and always used when someone opens the world. This creates the following two unwanted situations.
Cannot start with empty inventory in a world of someone else
Because the default player data is always used you cannot play in the world of someone else with new player data but instead start where the player who last played left and have the same items.
Default player data is used even if player data exists after playing in LAN
When you played in LAN before and an entry in the playerdata folder exists for a player the default player data is used anyways.
Imagine the following: Player 1 hosted the world and player 2 joined. After that player 2 opens the world, even though a player data entry exists he gets player 1's player data (=default player data) which even overwrites player 2's player data entry when he leaves the world.Suggested solution
See this reddit post.
is duplicated by
relates to
is duplicated by
is blocked by
relates to
is duplicated by
MAC OS X 10.8.2. Java 7 JDK.
is duplicated by
The bug
For singleplayer worlds the player data is written to the level.dat file as well (called "default player data" in the following) and always used when someone opens the world. This creates the following two unwanted situations.
Cannot start with empty inventory in a world of someone else
Because the default player data is always used you cannot play in the world of someone else with new player data but instead start where the player who last played left and have the same items.
Default player data is used even if player data exists after playing in LAN
When you played in LAN before and an entry in the playerdata folder exists for a player the default player data is used anyways.
Imagine the following: Player 1 hosted the world and player 2 joined. After that player 2 opens the world, even though a player data entry exists he gets player 1's player data (=default player data) which even overwrites player 2's player data entry when he leaves the world.Suggested solution
See this reddit post.
Workaround
Keep in mind that this is a bug tracker and not a discussion forum or a help desk. For questions, ask for example on reddit, the Minecraft Forum, or on other platforms.
Create a backup of your world before trying the following workaround. Otherwise you might loose data or your world can become corrupted.
The following steps require an NBT editor. Make sure it is up to date and supports changes to NBT structure introduced in the latest versions. You can use for example NBTExplorer version 2.8.0(+).
- Open the level.dat file of the world with an NBT editor
- Delete the Data > Player entry
- Save the file
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
The bug
For singleplayer worlds the player data is written to the level.dat file as well (called "default player data" in the following) and always used when someone opens the world. This creates the following two unwanted situations.
Cannot start with empty inventory in a world of someone else
Because the default player data is always used you cannot play in the world of someone else with new player data but instead start where the player who last played left and have the same items.
Default player data is used even if player data exists after playing in LAN
When you played in LAN before and an entry in the playerdata folder exists for a player the default player data is used anyways.
Imagine the following: Player 1 hosted the world and player 2 joined. After that player 2 opens the world, even though a player data entry exists he gets player 1's player data (=default player data) which even overwrites player 2's player data entry when he leaves the world.
SuggestedsolutionSee this reddit post.
Workaround
Keep in mind that this is a bug tracker and not a discussion forum or a help desk. For questions, ask for example on reddit, the Minecraft Forum, or on other platforms.
Create a backup of your world before trying the following workaround. Otherwise you might loose data or your world can become corrupted.
The following steps require an NBT editor. Make sure it is up to date and supports changes to NBT structure introduced in the latest versions. You can use for example NBTExplorer version 2.8.0(+).
- Open the level.dat file of the world with an NBT editor
- Delete the Data > Player entry
- Save the file
The bug
For singleplayer worlds the player data is written to the level.dat file as well (called "default player data" in the following) and always used when someone opens the world. This creates the following two unwanted situations.
Cannot start with empty inventory in a world of someone else
Because the default player data is always used you cannot play in the world of someone else with new player data but instead start where the player who last played left and have the same items.
Default player data is used even if player data exists after playing in LAN
When you played in LAN before and an entry in the playerdata folder exists for a player the default player data is used anyways.
Imagine the following: Player 1 hosted the world and player 2 joined. After that player 2 opens the world, even though a player data entry exists he gets player 1's player data (=default player data) which even overwrites player 2's player data entry when he leaves the world.Outdated default player data is used after loading world on a dedicated server
When a singleplayer world is loaded by a dedicated server and the default player data player joins, their playerdata entry is updated, but their default player data is not. Therefore when they load the world in singleplayer again, they have the old outdated player data.
Possible solution
See this reddit post for a discussion.
Have the game perform these steps when loading a world:
- If the default player data exists and for the same UUID a playerdata entry exists, overwrite the default player data with that. This is needed for the case where a singleplayer world was loaded by a dedicated server and therefore the default player data became outdated.
Then continue with the following steps:- If the default player data exists, but the UUID does not match the UUID of the current player:
Possibly offer a checkbox to determine whether the default player data should be overwritten by the current player.
Provide these options:
- Offer to continue where that player last left
- Offer to use own player data (in case playerdata entry exists) or otherwise with empty inventory at world spawn
- Otherwise: If the default player data exists and the UUID matches the UUID of the current player, use that data
- Otherwise: If no default player data exists use the matching playerdata entry or, in case that does not exist, start with an empty inventory at world spawn
Workaround
Keep in mind that this is a bug tracker and not a discussion forum or a help desk. For questions, ask for example on reddit, the Minecraft Forum, or on other platforms.
Create a backup of your world before trying the following workaround. Otherwise you might loose data or your world can become corrupted.
The following steps require an NBT editor. Make sure it is up to date and supports changes to NBT structure introduced in the latest versions. You can use for example NBTExplorer version 2.8.0(+).
- Open the level.dat file of the world with an NBT editor
- Delete the Data > Player entry
- Save the file
is duplicated by
is duplicated by
is duplicated by
is duplicated by
Can confirm in 1.16.5 and 21w06a, also, I am requesting ownership as the current reporter has been inactive since 2012
is duplicated by
is duplicated by
MC-230092
is duplicated by
I believe this is a dupe of MC-697, although this one doesn't explicitly mention the duplication exploit it implies.
I believe this is a dupe of the core problem behind MC-697.
This doesn't duplicate MC-697.
No chests of any kind involved.
No enderchests.
No ender anything.
This bug is not resolved.
The reason why this duplicates MC-697 is because 697 is not titled accurately. The issue described doesn't have anything to do with Ender Chests.
This is not a duplicate of MC-697. This bug is not about duplicating items from one player to another; it is about a single instance maintaining two versions of a single player's status, and reverting to an earlier version.
Duplicate of MC-697.
Ok, prepare for something... Could please a mod mark the versions for every bug I tell you here? That would be nice.
I have a world set up for fast bug testing. That means that going into each bug report and saying "Confirmed for 1.10.1" is way more work than actually testing it. So I want to confirm for 1.10.1 with this comment:
MC-4, MC-9, MC-14, MC-87, MC-112, MC-201, MC-212, MC-234, MC-258, MC-460, MC-577, MC-667, MC-679, MC-696, MC-697, MC-849, MC-868, MC-926, MC-957, MC-997, MC-1040, MC-1127, MC-1133, MC-1168, MC-1207, MC-1218, MC-1297, MC-1390, MC-1429, MC-1530, MC-1531, MC-1538, MC-1541, MC-1555, MC-1578, MC-1673, MC-1685, MC-1691, MC-1981 and MC-2023.
All of these are tested in 1.10.1. For some others I have additional information:
MC-711 not testable with my setup because of a crash that's new in 1.10.1.
MC-779: At least some appear outside, didn't test all. What's sure is that no general solution got introduced.
Confirmed MC-1511 for stone button, lever, torch, redstone dust, normal rail, end rod, tripwire hook, ladder and flower pot. Others are untested.
Confirmed MC-1874 for chest, brewing stand, enchanting table and flower pot. Others are untested. It's apparent that there isn't a general solution here either.
Thank you for your report!
However, this issue is a Duplicate of MC-697.
It has been linked to this report. If you have additional information, please add it to that report.
Please search before reporting, as it's likely that one exists already.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – 📖 Game Wiki
It looks like the default singleplayer data in the level.dat file was not updated between some versions, probably due to MC-124027 and now you are experiencing MC-697.
It is in general a bad idea to play non-test worlds in the snapshots since snapshots might corrupt your worlds. At least make backups.
It looks like you can solve this issue by using an NBT editor like NBTExplorer, then:
- Open the level.dat file
- Delete the Player tag
- Save the file
I tested it and was able to get the player data you expect in 1.13-pre5. However, since these are snapshots it looks like you will lose the bark recipes (which should not be a big problem).
Thank you for your report!
We're actually already tracking this issue in MC-697, so I resolved and linked this ticket as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature in the future to see if the issue has already been reported.
Thank you for your report!
We're actually already tracking this issue in MC-697, so I resolved and linked this ticket as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature in the future to see if the issue has already been reported.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – 📖 Game Wiki
Thank you for your report!
We're actually already tracking this issue in MC-697, so I resolved and linked this ticket as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature in the future to see if the issue has already been reported.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – 📖 Game Wiki
Thank you for your report!
We're actually already tracking this issue in MC-697, so I resolved and linked this ticket as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature in the future to see if the issue has already been reported.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – 📖 Game Wiki
Thank you for your report!
We're actually already tracking this issue in MC-697, so I resolved and linked this ticket as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature in the future to see if the issue has already been reported.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – 📖 Game Wiki
Thank you for your report!
However, we are already tracking this issue, and this report is a Duplicate of MC-697, which is a report that has not been resolved yet.
If you want, you can upvote the parent ticket, and enable watching to receive any updates about it - if you believe you have any information that may be important for this issue, please leave a comment on the parent. Please also use the search function in the future to prevent duplicate reports.
Quick Links:
📓 Issue Guidelines – 🛠 Community Support – 📧 Customer Support – ✍️ Feedback and Suggestions – 📖 Game Wiki
💬 Mojira Subreddit – 💬 Mojira Discord
Hi Edward, we're tracking this issue in MC-697, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Mojang Support – ✍️ Feedback and Suggestions – 📖 Game Wiki
Thank you for your report!
We're tracking this issue in MC-697, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
– I am a bot. This action was performed automatically! Please report any issues in Discord or Reddit
Thank you for your report!
We're tracking this issue in MC-697, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
Thank you for your report!
We're tracking this issue in MC-697, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
– I am a bot. This action was performed automatically! Please report any issues on Discord or Reddit
Thank you for your report!
We're tracking this issue in MC-697, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
This is somewhat serious, however I can not confirm because I don't have access to a copy of Minecraft at the moment. It makes sense, however.
Confirmed,only in LAN not multiplayer, they should make separate inventories for lan worlds and separate EnderChests.
I've seen this once, but that was because the minecraft servers were down and player two was called 'player' that's why he will get the same NBT data from the level.dat instead of it's own player.dat
Is this still a concern in the current Minecraft version? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.
Yes, this is still a concern with LAN play.
(edit: And it concerns all facets of a character to include inventory and enderchests, despite the title)
When a player with a different username logs into Minecraft from my computer and pulls up the world we play together: her inventory, location, enderchest, etc. are all replaced with the original 'main character' values, which then overwrite her .dat file.
I thought that was strange, because she already had a .dat file, but the game rewrote her to be me.
(We lost a ton of enchanted armor she had just made, and duped several silk touch items I had this way. To top it all off, because I was mapping, she ended up displaced about 5km.)
edit: This was around 13w25a (Sorry to not have exact; it was after zombie AI changes and before 1.6 pre-release, but I haven't seen anything regarding SSP/LAN save structure in patch notes, so I bet it's still in live).
so... the player that logged in wasn't just called 'player' ?
@Jesper Unlike your issue, the Minecraft servers were fine. The thing that caused this was player 2 logging on to player 1's machine and loading this world, which copied player 1's .dat file (possibly from the level.dat instead of "player1".dat or "player2".dat as you mentioned) and replaced player 2's permanently. Until opened to LAN, there is no one to see what another player is called, so I don't have the answer to your question.
hmm... if the player that logged in was called 'player' then it would make a bit sense, then you would use all the properties from the level.dat but in your case it's just weird
Is this still a concern in the current Minecraft version 1.6.4 / Launcher version 1.2.5 ? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.
Can confirm that this is an issue in 1.6.4 and 1.7.4 both.
Please send this to Dinnerbone so he fixes it.
Yes it is a problem in 1.7.4 and it ruined my experince with my sister. I got really sad that it hapenned, does anyone knows how she can access her ender chest again?
I don't know if the Reporter of the bug will update the post, but I tested it and THIS IS STILL A PROBLEM IN THE LATEST SNAPSHOT.
Ok
Is this still a concern in the latest Minecraft version 14w30c? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.
Affects 1.7.10 & 14w32d.
Also, could anyone with the ability change the title of this ticket to reflect the broader nature of the bug? You don't need Ender Chests at all to see this.
I'm kind of surprised this ticket hasn't gotten more attention. It's essentially game-breaking for groups of 2 or more who only own 1 computer, but still want to collaborate.
There are at least a half dozen bug reports on this issue, going back at least to v1.4.6. All of them have been marked "Duplicate" except
MC-5405, which has been marked "Invalid". The net result is that the moderators keep saying this is a non-issue, when in fact this continues to be a debilitating issue years after it was initially reported. The bug prohibits multiple players from playing on a single computer. It is open and it needs to be fixed.Yup it's there in 1.8.1-pre3
Reopened, thanks.
Confirmed for 1.10.
The fact that it also happens with the inventory is mentioned in the comments and in most of the duplicates, but not in the description here. Might need a general overhaul, because it's hard to understand.
Confirmed for 1.10.1.
For all we know, the fix could come whenever Jeb, Dinnerbone, Grumm, or someone else decides to change the save format, which might be a while
I don't think so. As far as I understand it, if you play in a SP world, the last saved inventory or the standard one or whatever gets copied to something linked to your UUID inside the saves folder. If that wouldn't happen, but it would just use the standard one while playing and also for the host in a LAN world, the inventories for UUIDs that get used on the LAN server would work normally and don't interfere with the normal SP playing. When it gets opened in LAN again later, there are the per-UUID inventories again ready to use.
Would the title "Opening singleplayer world uses default player data even if playerdata for user exists after playing in LAN before" describe this bug better? That is based on
MC-44064Marcono1234: aye, sounds better to me.
Still an issue in 1.12.2 LAN. Affected ender chest, location, armour, inventory. When a second player opens tge world in single player mode they are given the first player's stuff. Also overwrote player 2 advancements.
Is there a ticket for this issue for Bedrock Edition? I can;t find it when I search but I'm having this issue too but for MCPE. It makes it difficult for the host to transfer to another host. (like if your device can't handle it anymore or something) It opens the world as you and not the other player (who already has playerdata for that world).
Is there even a workaround for this? Like if I find the default player data and remove it before loading the world?
Trying to swap host machines for a LAN hosted world. 1.12.2
Yes, just delete the inventory. Or, if you want to preserve the players' inventories, you have to move the inventories into the folders for the correct UUIDs.
Fabian, I have tried swapping the filenames (UUIDs?) of the two .DAT files within the /playerdata folder - this did not work, should it have? what file would i need to delete?
From what I can see, it should work. Try it with two non-hosting inventories (A hosts LAN world, B and C join, you swap B and C).
I will try again, but someone said that when launching the world the default (single player) host data will overwrite the UUID playerdata file.
If this is true I need to find the default host data file(s) and delete or overwrite before launching the world.
@Mitchell Brown, I added a workaround to the description. This should hopefully work.
I experienced this too, when I opened my world to lan, and later opened it under their account. From the description I understand this really is a bug, I imagined it might just be intended how the world is saved between single/multiplayer. I hope this gets fixed somehow sometime!
Confirmed in 20w27a
Confirmed in 1.16.4.
This bug was reported on the first day the issue tracker was open and still hasn't been fixed more than 8 years later.
I've gotten many emails about new comments here, but when I come to the page they're gone – is a mod deleting them?
Yes, don't worry.
A while back somebody said they were self-assigning this, and I saw their name under "Assignee" but now it's back to "Unassigned." What gives?
I can confirm for 1.17 release candidate 2, Assuming this is what I experienced. I logged on to a world on my main account, logged off, and back on with my second account using the same PC. We shared inventories. I then hosted a LAN world on my main and joined the LAN world on my alt, the alt had the same inventory as it did before, therefore, I was able to dupe items an infinite amount of times with this as the alt account's inventory changed to my main's every time I logged on to it in singleplayer. when you log onto a world in single player the inventory becomes the same as the last time the world was loaded, regardless of which account. This allows for duplicating an entire inventory as many times as you want as long as you have 2 accounts open on the same device. Although if your looking to dupe items and your using LAN to do so, its easier to just turn on cheats with LAN and go into creative mode.
Can confirm in 1.19.3
Can confirm in 23w03a
Can confirm in 23w04a
Can confirm in 23w05a
Can confirm in 23w06a