diff --git a/SchematicSystem_12/src/de/steamwar/schematicsystem/WorldEdit_12.java b/SchematicSystem_12/src/de/steamwar/schematicsystem/WorldEdit_12.java index e3659c8..c464650 100644 --- a/SchematicSystem_12/src/de/steamwar/schematicsystem/WorldEdit_12.java +++ b/SchematicSystem_12/src/de/steamwar/schematicsystem/WorldEdit_12.java @@ -1,8 +1,11 @@ package de.steamwar.schematicsystem; -import com.sk89q.worldedit.*; +import com.sk89q.worldedit.EditSession; +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.session.ClipboardHolder; import com.sk89q.worldedit.world.World; import de.steamwar.sql.NoClipboardException; import de.steamwar.sql.Schematic; @@ -23,11 +26,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); - try { - ((CuboidClipboard)clipboard).paste(e, v, false, true); - } catch (MaxChangedBlocksException ex) { - throw new IOException(ex); - } + new ClipboardHolder(clipboard, weWorld.getWorldData()).createPaste(e, weWorld.getWorldData()).to(v).build(); e.flushQueue(); return e; }