Simplify commit-required detection

This commit is contained in:
Kenzie Togami
2018-11-03 22:22:43 -07:00
parent 351a8bbc6c
commit e202348dac
2 changed files with 10 additions and 15 deletions

View File

@@ -37,11 +37,8 @@ public class TracedEditSession extends EditSession {
@Override
protected void finalize() throws Throwable {
super.finalize();
if (!isQueueEnabled() && !isBatchingChunks()) {
return;
}
if (getChunkBatchingExtent().commitRequired() || getReorderExtent().commitRequired()) {
if (commitRequired()) {
WorldEdit.logger.warning("####### LEFTOVER BUFFER BLOCKS DETECTED #######");
WorldEdit.logger.warning("This means that some code did not flush their EditSession.");
WorldEdit.logger.log(Level.WARNING, "Here is a stacktrace from the creation of this EditSession:", stacktrace);