Fix some minor ordering bugs

This commit is contained in:
Kenzie Togami
2018-10-10 12:23:00 -07:00
parent 7d4906cfe9
commit 2824a92c19
2 changed files with 6 additions and 2 deletions

View File

@ -90,10 +90,14 @@ public class ChunkBatchingExtent extends AbstractDelegateExtent {
}
return new Operation() {
private final Iterator<LocatedBlockList> batchIterator = batches.values().iterator();
// we get modified between create/resume -- only create this on resume to prevent CME
private Iterator<LocatedBlockList> batchIterator;
@Override
public Operation resume(RunContext run) throws WorldEditException {
if (batchIterator == null) {
batchIterator = batches.values().iterator();
}
if (!batchIterator.hasNext()) {
return null;
}