Close all the files after unload instead of before

- This ensures that all file handles are closed after a world is
unloaded, since the unloadChunk function calls saveChunk, which
opens files.
- Should resolve issue #3995
This commit is contained in:
Yukiiro-Nite 2019-07-21 01:01:42 -04:00
parent 308e3a4b1f
commit c03907b5a3

View File

@ -242,7 +242,6 @@ public class HashChunkManager implements ChunkManager {
return; return;
} }
closeAll();
String worldName = world.getName(); String worldName = world.getName();
List<String> keys = new ArrayList<String>(store.keySet()); List<String> keys = new ArrayList<String>(store.keySet());
@ -257,6 +256,7 @@ public class HashChunkManager implements ChunkManager {
} }
} }
} }
closeAll();
} }
@Override @Override