Dieser Commit ist enthalten in:
Ursprung
d4f49aeddb
Commit
6d7b2eec1a
@ -20,6 +20,8 @@
|
||||
package de.steamwar.bausystem.region;
|
||||
|
||||
import com.sk89q.worldedit.EditSession;
|
||||
import com.sk89q.worldedit.WorldEdit;
|
||||
import com.sk89q.worldedit.bukkit.BukkitWorld;
|
||||
import com.sk89q.worldedit.extent.clipboard.Clipboard;
|
||||
import de.steamwar.bausystem.BauSystem;
|
||||
import de.steamwar.bausystem.region.flags.Flag;
|
||||
@ -502,20 +504,15 @@ public class Region {
|
||||
|
||||
public boolean undo() {
|
||||
initSessions();
|
||||
EditSession session = null;
|
||||
try {
|
||||
session = undoSessions.pop();
|
||||
if (session == null) {
|
||||
EditSession session = undoSessions.pop();
|
||||
if (session == null)
|
||||
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;
|
||||
} finally {
|
||||
if (session != null) {
|
||||
session.flushSession();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean redo() {
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren