Fix for VS
This commit is contained in:
parent
861b10403d
commit
801495c1bb
@ -81,6 +81,22 @@ public class Sniper {
|
|||||||
private ChangeSetFaweQueue changeQueue;
|
private ChangeSetFaweQueue changeQueue;
|
||||||
private FaweQueue baseQueue;
|
private FaweQueue baseQueue;
|
||||||
|
|
||||||
|
public void storeUndo(Undo undo) {
|
||||||
|
ChangeSetFaweQueue tmpQueue;
|
||||||
|
synchronized (this) {
|
||||||
|
tmpQueue = changeQueue;
|
||||||
|
maskQueue = null;
|
||||||
|
baseQueue = null;
|
||||||
|
changeQueue = null;
|
||||||
|
}
|
||||||
|
if (tmpQueue != null) {
|
||||||
|
FaweChangeSet changeSet = tmpQueue.getChangeSet();
|
||||||
|
FawePlayer<Object> fp = FawePlayer.wrap(getPlayer());
|
||||||
|
LocalSession session = fp.getSession();
|
||||||
|
session.remember(changeSet.toEditSession(fp));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Added
|
// Added
|
||||||
public AsyncWorld getWorld() {
|
public AsyncWorld getWorld() {
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
@ -382,24 +398,6 @@ public class Sniper {
|
|||||||
this.enabled = enabled;
|
this.enabled = enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void storeUndo(Undo undo) {
|
|
||||||
synchronized (this) {
|
|
||||||
if (changeQueue != null) {
|
|
||||||
FaweChangeSet changeSet = changeQueue.getChangeSet();
|
|
||||||
FawePlayer<Object> fp = FawePlayer.wrap(getPlayer());
|
|
||||||
LocalSession session = fp.getSession();
|
|
||||||
session.remember(changeSet.toEditSession(fp));
|
|
||||||
com.sk89q.worldedit.world.World worldEditWorld = fp.getWorld();
|
|
||||||
changeSet = FaweChangeSet.getDefaultChangeSet(worldEditWorld, fp.getUUID());
|
|
||||||
changeQueue.setChangeSet(changeSet);
|
|
||||||
// NEW QUEUE?
|
|
||||||
maskQueue = null;
|
|
||||||
baseQueue = null;
|
|
||||||
changeQueue = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void undo() {
|
public void undo() {
|
||||||
undo(1);
|
undo(1);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user