Dieser Commit ist enthalten in:
Ursprung
d4f49aeddb
Commit
6d7b2eec1a
@ -20,6 +20,8 @@
|
|||||||
package de.steamwar.bausystem.region;
|
package de.steamwar.bausystem.region;
|
||||||
|
|
||||||
import com.sk89q.worldedit.EditSession;
|
import com.sk89q.worldedit.EditSession;
|
||||||
|
import com.sk89q.worldedit.WorldEdit;
|
||||||
|
import com.sk89q.worldedit.bukkit.BukkitWorld;
|
||||||
import com.sk89q.worldedit.extent.clipboard.Clipboard;
|
import com.sk89q.worldedit.extent.clipboard.Clipboard;
|
||||||
import de.steamwar.bausystem.BauSystem;
|
import de.steamwar.bausystem.BauSystem;
|
||||||
import de.steamwar.bausystem.region.flags.Flag;
|
import de.steamwar.bausystem.region.flags.Flag;
|
||||||
@ -502,20 +504,15 @@ public class Region {
|
|||||||
|
|
||||||
public boolean undo() {
|
public boolean undo() {
|
||||||
initSessions();
|
initSessions();
|
||||||
EditSession session = null;
|
EditSession session = undoSessions.pop();
|
||||||
try {
|
if (session == null)
|
||||||
session = undoSessions.pop();
|
|
||||||
if (session == null) {
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
try (EditSession e = WorldEdit.getInstance().getEditSessionFactory().getEditSession(new BukkitWorld(Bukkit.getWorlds().get(0)), -1)) {
|
||||||
|
session.undo(e);
|
||||||
|
redoSessions.push(e);
|
||||||
}
|
}
|
||||||
session.undo(session);
|
|
||||||
redoSessions.push(session);
|
|
||||||
return true;
|
return true;
|
||||||
} finally {
|
|
||||||
if (session != null) {
|
|
||||||
session.flushSession();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean redo() {
|
public boolean redo() {
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren