geforkt von Mirrors/FastAsyncWorldEdit
Move Clipboards to /tmp + Update upstream #3
@ -110,7 +110,7 @@ public class BukkitPlayer extends AbstractPlayerActor {
|
||||
if (player != null && Settings.settings().CLIPBOARD.USE_DISK) {
|
||||
BukkitPlayer cached = WorldEditPlugin.getInstance().getCachedPlayer(player);
|
||||
if (cached == null) {
|
||||
loadClipboardFromDisk();
|
||||
//loadClipboardFromDisk();
|
||||
}
|
||||
}
|
||||
//FAWE end
|
||||
|
@ -71,16 +71,25 @@ public class DiskOptimizedClipboard extends LinearClipboard {
|
||||
private boolean canHaveBiomes = true;
|
||||
private int nbtBytesRemaining;
|
||||
|
||||
private static File createTmpFile() {
|
||||
File temp;
|
||||
try {
|
||||
temp = File.createTempFile("fawe", ".bd");
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
temp.deleteOnExit();
|
||||
|
||||
return temp;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new DiskOptimizedClipboard for the given region. Creates or overwrites a file using the given UUID as a name.
|
||||
*/
|
||||
public DiskOptimizedClipboard(Region region, UUID uuid) {
|
||||
this(
|
||||
region.getDimensions(),
|
||||
MainUtil.getFile(
|
||||
Fawe.instance() != null ? Fawe.platform().getDirectory() : new File("."),
|
||||
Settings.settings().PATHS.CLIPBOARD + File.separator + uuid + ".bd"
|
||||
)
|
||||
createTmpFile()
|
||||
);
|
||||
setOffset(region.getMinimumPoint());
|
||||
setOrigin(region.getMinimumPoint());
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren