mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 17:57:38 +00:00
Fixed McRegionReader not being closed.
This commit is contained in:
parent
1d68fdd11c
commit
49b4c190f9
@ -48,8 +48,15 @@ public abstract class McRegionChunkStore extends ChunkStore {
|
||||
|
||||
protected McRegionReader getReader(Vector2D pos) throws DataException, IOException {
|
||||
String filename = getFilename(pos);
|
||||
if (curFilename != null && curFilename.equals(filename)) {
|
||||
if (curFilename != null) {
|
||||
if (curFilename.equals(filename)) {
|
||||
return cachedReader;
|
||||
} else {
|
||||
try {
|
||||
cachedReader.close();
|
||||
} catch (IOException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
InputStream stream = getInputStream(filename);
|
||||
cachedReader = new McRegionReader(stream);
|
||||
|
Loading…
Reference in New Issue
Block a user