geforkt von Mirrors/FastAsyncWorldEdit
Ensure we flush iff it is needed
Dieser Commit ist enthalten in:
Ursprung
a3f1c71d97
Commit
d1312c66e1
@ -415,7 +415,7 @@ public class EditSession implements Extent, AutoCloseable {
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (!batchingChunks) {
|
||||
if (!batchingChunks && isBatchingChunks()) {
|
||||
flushSession();
|
||||
}
|
||||
chunkBatchingExtent.setEnabled(batchingChunks);
|
||||
@ -428,9 +428,15 @@ public class EditSession implements Extent, AutoCloseable {
|
||||
* @see #setBatchingChunks(boolean)
|
||||
*/
|
||||
public void disableBuffering() {
|
||||
// We optimize here to avoid double calls to flushSession.
|
||||
// We optimize here to avoid repeated calls to flushSession.
|
||||
boolean needsFlush = isQueueEnabled() || isBatchingChunks();
|
||||
if (needsFlush) {
|
||||
flushSession();
|
||||
}
|
||||
reorderExtent.setEnabled(false);
|
||||
setBatchingChunks(false);
|
||||
if (chunkBatchingExtent != null) {
|
||||
chunkBatchingExtent.setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren