diff --git a/PlotSquared/pom.xml b/PlotSquared/pom.xml
index e76aa7413..ade54f69d 100644
--- a/PlotSquared/pom.xml
+++ b/PlotSquared/pom.xml
@@ -8,7 +8,7 @@
UTF-8
PlotSquared
- 2.11.5
+ 2.11.6
PlotSquared
jar
diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/SchematicHandler.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/SchematicHandler.java
index a485cbd5c..97f76b364 100644
--- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/SchematicHandler.java
+++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/SchematicHandler.java
@@ -6,6 +6,7 @@ import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util.Iterator;
@@ -39,20 +40,22 @@ public abstract class SchematicHandler {
private boolean exportAll = false;
- public boolean exportAll(final Collection plots, final File outputDir, final String namingScheme, final Runnable ifSuccess) {
+ public boolean exportAll(final Collection collection, final File outputDir, final String namingScheme, final Runnable ifSuccess) {
if (exportAll) {
return false;
}
- if (plots.size() == 0) {
+ if (collection.size() == 0) {
return false;
}
exportAll = true;
+ final ArrayList plots = new ArrayList(collection);
TaskManager.index.increment();
final Integer currentIndex = TaskManager.index.toInteger();
final int task = TaskManager.runTaskRepeat(new Runnable() {
@Override
public void run() {
if (plots.size() == 0) {
+ exportAll = false;
Bukkit.getScheduler().cancelTask(TaskManager.tasks.get(currentIndex));
TaskManager.tasks.remove(currentIndex);
TaskManager.runTask(ifSuccess);
diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/WorldEditSchematic.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/WorldEditSchematic.java
index c23f6549c..67a29d97f 100644
--- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/WorldEditSchematic.java
+++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/WorldEditSchematic.java
@@ -1,8 +1,6 @@
package com.intellectualcrafters.plot.util;
import java.io.File;
-import java.io.IOException;
-
import org.bukkit.Bukkit;
import com.intellectualcrafters.plot.PlotSquared;
@@ -12,15 +10,10 @@ import com.sk89q.worldedit.CuboidClipboard;
import com.sk89q.worldedit.EditSession;
import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.bukkit.BukkitWorld;
-import com.sk89q.worldedit.data.DataException;
-import com.sk89q.worldedit.extent.clipboard.Clipboard;
import com.sk89q.worldedit.regions.CuboidRegion;
-import com.sk89q.worldedit.schematic.MCEditSchematicFormat;
-import com.sk89q.worldedit.schematic.SchematicFormat;
public class WorldEditSchematic {
public void saveSchematic(String file, final String world, final PlotId id) {
- System.out.print("SAVCING SCHSAKJHDJKAS HDKAS");
Location bot = MainUtil.getPlotBottomLoc(world, id).add(1, 0, 1);
Location top = MainUtil.getPlotTopLoc(world, id);
Vector size = new Vector(top.getX() - bot.getX() + 1, top.getY() - bot.getY() - 1, top.getZ() - bot.getZ() + 1);
@@ -28,7 +21,6 @@ public class WorldEditSchematic {
CuboidClipboard clipboard = new CuboidClipboard(size, origin);
Vector pos1 = new Vector(bot.getX(), bot.getY(), bot.getZ());
Vector pos2 = new Vector(top.getX(), top.getY(), top.getZ());
- CuboidRegion region = new CuboidRegion(pos1, pos2);
EditSession session = PlotSquared.worldEdit.getWorldEdit().getEditSessionFactory().getEditSession(new BukkitWorld(Bukkit.getWorld(world)), 999999999);
clipboard.copy(session);
try {