From 888699cae0dabdf11ddbf9e84c31dc5500a67d46 Mon Sep 17 00:00:00 2001 From: sk89q Date: Sun, 30 Jan 2011 20:41:34 -0800 Subject: [PATCH] Enabled queue on EditSessions given to scripts. --- src/com/sk89q/worldedit/WorldEdit.java | 1 + src/com/sk89q/worldedit/scripting/CraftScriptContext.java | 1 + 2 files changed, 2 insertions(+) diff --git a/src/com/sk89q/worldedit/WorldEdit.java b/src/com/sk89q/worldedit/WorldEdit.java index 59da0ebee..fd6c04192 100644 --- a/src/com/sk89q/worldedit/WorldEdit.java +++ b/src/com/sk89q/worldedit/WorldEdit.java @@ -930,6 +930,7 @@ public class WorldEdit { e.printStackTrace(); } finally { for (EditSession editSession : scriptContext.getEditSessions()) { + editSession.flushQueue(); session.remember(editSession); } } diff --git a/src/com/sk89q/worldedit/scripting/CraftScriptContext.java b/src/com/sk89q/worldedit/scripting/CraftScriptContext.java index d63f0aa0b..51fb65502 100644 --- a/src/com/sk89q/worldedit/scripting/CraftScriptContext.java +++ b/src/com/sk89q/worldedit/scripting/CraftScriptContext.java @@ -63,6 +63,7 @@ public class CraftScriptContext extends CraftScriptEnvironment { EditSession editSession = new EditSession(server, player.getWorld(), session.getBlockChangeLimit(), session.getBlockBag(player)); + editSession.enableQueue(); editSessions.add(editSession); return editSession; }