mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 17:27:38 +00:00
Fix DiskOptimisedClipboard not closing
This commit is contained in:
parent
76efbed4b2
commit
3cd30ebbff
@ -10,7 +10,6 @@ import com.sk89q.jnbt.IntTag;
|
||||
import com.sk89q.jnbt.Tag;
|
||||
import com.sk89q.worldedit.entity.BaseEntity;
|
||||
import com.sk89q.worldedit.entity.Entity;
|
||||
import com.sk89q.worldedit.extension.platform.PlatformCommandManager;
|
||||
import com.sk89q.worldedit.extent.clipboard.BlockArrayClipboard;
|
||||
import com.sk89q.worldedit.math.BlockVector3;
|
||||
import com.sk89q.worldedit.regions.CuboidRegion;
|
||||
@ -99,7 +98,6 @@ public class DiskOptimizedClipboard extends LinearClipboard implements Closeable
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
log.warn("Creating new RandomAccessFile: " + file.getPath());
|
||||
this.braf = new RandomAccessFile(file, "rw");
|
||||
long fileLength = (long) getVolume() * 2L + (long) HEADER_SIZE;
|
||||
braf.setLength(0);
|
||||
@ -286,7 +284,6 @@ public class DiskOptimizedClipboard extends LinearClipboard implements Closeable
|
||||
if (byteBuffer != null) {
|
||||
byteBuffer.force();
|
||||
fileChannel.close();
|
||||
log.warn("Closing the RandomAccessFile: " + file.getPath());
|
||||
braf.close();
|
||||
//noinspection ResultOfMethodCallIgnored
|
||||
file.setWritable(true);
|
||||
|
@ -271,6 +271,11 @@ public class BlockArrayClipboard implements Clipboard {
|
||||
return parent;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() {
|
||||
this.parent.close();
|
||||
}
|
||||
|
||||
/**
|
||||
* Stores entity data.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user