mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2024-11-28 21:56:33 +01:00
Fix for VS
This commit is contained in:
parent
861b10403d
commit
801495c1bb
@ -81,6 +81,22 @@ public class Sniper {
|
||||
private ChangeSetFaweQueue changeQueue;
|
||||
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
|
||||
public AsyncWorld getWorld() {
|
||||
synchronized (this) {
|
||||
@ -382,24 +398,6 @@ public class Sniper {
|
||||
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() {
|
||||
undo(1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user