From 227f297e797e98dfa9bf17992e83ef0e51a84b5c Mon Sep 17 00:00:00 2001 From: Lixfel Date: Tue, 10 Dec 2019 18:44:18 +0100 Subject: [PATCH] Fixing schematic pasting --- .../src/de/steamwar/schematicsystem/WorldEdit_12.java | 3 ++- .../src/de/steamwar/schematicsystem/WorldEdit_14.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/SchematicSystem_12/src/de/steamwar/schematicsystem/WorldEdit_12.java b/SchematicSystem_12/src/de/steamwar/schematicsystem/WorldEdit_12.java index c464650..191887f 100644 --- a/SchematicSystem_12/src/de/steamwar/schematicsystem/WorldEdit_12.java +++ b/SchematicSystem_12/src/de/steamwar/schematicsystem/WorldEdit_12.java @@ -5,6 +5,7 @@ import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.bukkit.BukkitWorld; import com.sk89q.worldedit.extent.clipboard.Clipboard; +import com.sk89q.worldedit.function.operation.Operations; import com.sk89q.worldedit.session.ClipboardHolder; import com.sk89q.worldedit.world.World; import de.steamwar.sql.NoClipboardException; @@ -26,7 +27,7 @@ class WorldEdit_12 { Vector dimensions = clipboard.getDimensions(); Vector v = vector.subtract(dimensions.getX()/2 - dimensions.getX()%2, 0, dimensions.getZ()).subtract(offset); EditSession e = WorldEdit.getInstance().getEditSessionFactory().getEditSession(weWorld, -1); - new ClipboardHolder(clipboard, weWorld.getWorldData()).createPaste(e, weWorld.getWorldData()).to(v).build(); + Operations.completeBlindly(new ClipboardHolder(clipboard, weWorld.getWorldData()).createPaste(e, weWorld.getWorldData()).to(v).build()); e.flushQueue(); return e; } diff --git a/SchematicSystem_14/src/de/steamwar/schematicsystem/WorldEdit_14.java b/SchematicSystem_14/src/de/steamwar/schematicsystem/WorldEdit_14.java index 31b7b96..6d3336b 100644 --- a/SchematicSystem_14/src/de/steamwar/schematicsystem/WorldEdit_14.java +++ b/SchematicSystem_14/src/de/steamwar/schematicsystem/WorldEdit_14.java @@ -5,6 +5,7 @@ import com.sk89q.worldedit.MaxChangedBlocksException; import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.bukkit.BukkitWorld; import com.sk89q.worldedit.extent.clipboard.Clipboard; +import com.sk89q.worldedit.function.operation.Operations; import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.session.ClipboardHolder; import com.sk89q.worldedit.world.World; @@ -28,7 +29,7 @@ class WorldEdit_14 { BlockVector3 v = vector.subtract(dimensions.getX()/2 - dimensions.getX()%2, 0, dimensions.getZ()).subtract(offset); EditSession e = WorldEdit.getInstance().getEditSessionFactory().getEditSession(weWorld, -1); try { - new ClipboardHolder(clipboard).createPaste(e).to(v).build(); + Operations.completeBlindly(new ClipboardHolder(clipboard).createPaste(e).to(v).build()); } catch (MaxChangedBlocksException ex) { throw new IOException(ex); }