some fixes

Use sponge schematic format instead of structure block
Fix VS undo running on main thread
Fix missing sections when setting blocks
This commit is contained in:
Jesse Boyd
2018-09-18 12:49:33 +10:00
parent 83464013ba
commit 5b5336cc83
19 changed files with 431 additions and 322 deletions

View File

@@ -512,26 +512,21 @@ public class Sniper {
public void undo(int amount) {
FawePlayer<Object> fp = FawePlayer.wrap(getPlayer());
if (!fp.runAction(new Runnable() {
@Override
public void run() {
int count = 0;
for (int i = 0; i < amount; i++) {
EditSession es = fp.getSession().undo(null, fp.getPlayer());
if (es == null) {
break;
} else {
es.flushQueue();
}
count++;
}
if (count > 0) {
BBC.COMMAND_UNDO_SUCCESS.send(fp);
} else {
BBC.COMMAND_UNDO_ERROR.send(fp);
}
int count = 0;
for (int i = 0; i < amount; i++) {
EditSession es = fp.getSession().undo(null, fp.getPlayer());
if (es == null) {
break;
} else {
es.flushQueue();
}
}, true, false));
count++;
}
if (count > 0) {
BBC.COMMAND_UNDO_SUCCESS.send(fp);
} else {
BBC.COMMAND_UNDO_ERROR.send(fp);
}
}
public void reset(String toolId) {