geforkt von Mirrors/FastAsyncWorldEdit
Dieser Commit ist enthalten in:
Ursprung
2553f169aa
Commit
dd8ed8d5c6
@ -110,7 +110,7 @@ public class BukkitPlayer extends AbstractPlayerActor {
|
|||||||
if (player != null && Settings.settings().CLIPBOARD.USE_DISK) {
|
if (player != null && Settings.settings().CLIPBOARD.USE_DISK) {
|
||||||
BukkitPlayer cached = WorldEditPlugin.getInstance().getCachedPlayer(player);
|
BukkitPlayer cached = WorldEditPlugin.getInstance().getCachedPlayer(player);
|
||||||
if (cached == null) {
|
if (cached == null) {
|
||||||
loadClipboardFromDisk();
|
//loadClipboardFromDisk();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//FAWE end
|
//FAWE end
|
||||||
|
@ -71,16 +71,25 @@ public class DiskOptimizedClipboard extends LinearClipboard {
|
|||||||
private boolean canHaveBiomes = true;
|
private boolean canHaveBiomes = true;
|
||||||
private int nbtBytesRemaining;
|
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.
|
* 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) {
|
public DiskOptimizedClipboard(Region region, UUID uuid) {
|
||||||
this(
|
this(
|
||||||
region.getDimensions(),
|
region.getDimensions(),
|
||||||
MainUtil.getFile(
|
createTmpFile()
|
||||||
Fawe.instance() != null ? Fawe.platform().getDirectory() : new File("."),
|
|
||||||
Settings.settings().PATHS.CLIPBOARD + File.separator + uuid + ".bd"
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
setOffset(region.getMinimumPoint());
|
setOffset(region.getMinimumPoint());
|
||||||
setOrigin(region.getMinimumPoint());
|
setOrigin(region.getMinimumPoint());
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren