mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2024-12-29 12:37:53 +01:00
Discard unused EditSession when using /u
This commit is contained in:
parent
2448b2fe22
commit
bcb9320a45
@ -25,6 +25,7 @@ import com.google.common.collect.ClassToInstanceMap;
|
||||
import com.google.common.collect.HashBiMap;
|
||||
import com.google.common.collect.ImmutableBiMap;
|
||||
import com.google.common.collect.MutableClassToInstanceMap;
|
||||
import com.sk89q.worldedit.EditSession;
|
||||
import com.sk89q.worldedit.LocalSession;
|
||||
import com.sk89q.worldedit.extent.MaskingExtent;
|
||||
import com.sk89q.worldedit.function.mask.Mask;
|
||||
@ -465,8 +466,11 @@ public class Sniper {
|
||||
public void run() {
|
||||
int count = 0;
|
||||
for (int i = 0; i < amount; i++) {
|
||||
if (fp.getSession().undo(null, fp.getPlayer()) == null) {
|
||||
EditSession es = fp.getSession().undo(null, fp.getPlayer());
|
||||
if (es == null) {
|
||||
break;
|
||||
} else {
|
||||
es.flushQueue();
|
||||
}
|
||||
count++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user