mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-17 19:15:13 +00:00
Use buffered streams when managing NBT files
This commit is contained in:
1 parent
8d1619589d
commit
f2180dfab5
7 files changed
+51
-47
No files matched your search
@@ -39,7 +39,7 @@ public class PlayerSave
|
||||
if (!saveFile.exists())
|
||||
saveFile.createNewFile();
|
||||
if (saveFile.length() > 0)
|
||||
nbt = CompressedStreamTools.read(saveFile);
|
||||
nbt = NEIServerUtils.readNBT(saveFile);
|
||||
} catch (Exception e) {
|
||||
NEIClientConfig.logger.error("Error loading player save: "+username, e);
|
||||
}
|
||||
@@ -62,7 +62,7 @@ public class PlayerSave
|
||||
saveCreativeInv();
|
||||
|
||||
try {
|
||||
CompressedStreamTools.write(nbt, saveFile);
|
||||
NEIServerUtils.writeNBT(nbt, saveFile);
|
||||
isDirty = false;
|
||||
} catch (Exception e) {
|
||||
NEIClientConfig.logger.error("Error saving player: "+username, e);
|
||||
|
||||
Reference in new issue
Block a user