Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-26 02:50:06 +01:00
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;
|
return;
|
||||||
}
|
}
|
||||||
if (!batchingChunks) {
|
if (!batchingChunks && isBatchingChunks()) {
|
||||||
flushSession();
|
flushSession();
|
||||||
}
|
}
|
||||||
chunkBatchingExtent.setEnabled(batchingChunks);
|
chunkBatchingExtent.setEnabled(batchingChunks);
|
||||||
@ -428,9 +428,15 @@ public class EditSession implements Extent, AutoCloseable {
|
|||||||
* @see #setBatchingChunks(boolean)
|
* @see #setBatchingChunks(boolean)
|
||||||
*/
|
*/
|
||||||
public void disableBuffering() {
|
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);
|
reorderExtent.setEnabled(false);
|
||||||
setBatchingChunks(false);
|
if (chunkBatchingExtent != null) {
|
||||||
|
chunkBatchingExtent.setEnabled(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren