mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-30 12:11:47 +01:00
Use a different temp file for each player to avoid corruption. Fixes BUKKIT-1607
This commit is contained in:
parent
ef7e14f9ef
commit
cbd20ec9ea
1 changed files with 1 additions and 1 deletions
|
@ -173,7 +173,7 @@ public class WorldNBTStorage implements PlayerFileData, IDataManager {
|
||||||
NBTTagCompound nbttagcompound = new NBTTagCompound();
|
NBTTagCompound nbttagcompound = new NBTTagCompound();
|
||||||
|
|
||||||
entityhuman.d(nbttagcompound);
|
entityhuman.d(nbttagcompound);
|
||||||
File file1 = new File(this.playerDir, "_tmp_.dat");
|
File file1 = new File(this.playerDir, entityhuman.name + ".dat~"); // CraftBukkit - don't save every player to the same file
|
||||||
File file2 = new File(this.playerDir, entityhuman.name + ".dat");
|
File file2 = new File(this.playerDir, entityhuman.name + ".dat");
|
||||||
|
|
||||||
NBTCompressedStreamTools.a(nbttagcompound, (OutputStream) (new FileOutputStream(file1)));
|
NBTCompressedStreamTools.a(nbttagcompound, (OutputStream) (new FileOutputStream(file1)));
|
||||||
|
|
Loading…
Reference in a new issue