diff --git a/src/main/java/world/bentobox/bentobox/blueprints/BlueprintPaster.java b/src/main/java/world/bentobox/bentobox/blueprints/BlueprintPaster.java index 2ed4430a6..4710ee30d 100644 --- a/src/main/java/world/bentobox/bentobox/blueprints/BlueprintPaster.java +++ b/src/main/java/world/bentobox/bentobox/blueprints/BlueprintPaster.java @@ -219,9 +219,11 @@ public class BlueprintPaster { } private void pasteEntity(World world, Location location, Entry> entry) { + System.out.println(location.toString()); int x = location.getBlockX() + entry.getKey().getBlockX(); int y = location.getBlockY() + entry.getKey().getBlockY(); int z = location.getBlockZ() + entry.getKey().getBlockZ(); + System.out.println(x + " " + y + " " + z); setEntity(new Location(world, x, y, z), entry.getValue()); } diff --git a/src/main/java/world/bentobox/bentobox/blueprints/worldedit/BlueprintClipboardFormat.java b/src/main/java/world/bentobox/bentobox/blueprints/worldedit/BlueprintClipboardFormat.java index e427e01d6..ded9f9820 100644 --- a/src/main/java/world/bentobox/bentobox/blueprints/worldedit/BlueprintClipboardFormat.java +++ b/src/main/java/world/bentobox/bentobox/blueprints/worldedit/BlueprintClipboardFormat.java @@ -1,6 +1,5 @@ -package world.bentobox.bentobox.blueprints; +package world.bentobox.bentobox.blueprints.worldedit; -import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Sets; import com.google.gson.Gson; @@ -9,19 +8,13 @@ import com.sk89q.worldedit.extent.clipboard.io.ClipboardFormat; import com.sk89q.worldedit.extent.clipboard.io.ClipboardReader; import com.sk89q.worldedit.extent.clipboard.io.ClipboardWriter; import world.bentobox.bentobox.BentoBox; -import world.bentobox.bentobox.api.addons.GameModeAddon; -import world.bentobox.bentobox.api.commands.admin.blueprints.AdminBlueprintCommand; -import world.bentobox.bentobox.blueprints.converter.BlueprintClipboardReader; -import world.bentobox.bentobox.blueprints.converter.BlueprintClipboardWriter; +import world.bentobox.bentobox.blueprints.Blueprint; import world.bentobox.bentobox.database.json.BentoboxTypeAdapterFactory; -import world.bentobox.bentobox.managers.BlueprintClipboardManager; -import world.bentobox.bentobox.managers.BlueprintsManager; import java.io.*; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; -import java.util.Arrays; import java.util.Set; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; diff --git a/src/main/java/world/bentobox/bentobox/blueprints/worldedit/BlueprintClipboardReader.java b/src/main/java/world/bentobox/bentobox/blueprints/worldedit/BlueprintClipboardReader.java index f07cd8dfe..3a83ce3af 100644 --- a/src/main/java/world/bentobox/bentobox/blueprints/worldedit/BlueprintClipboardReader.java +++ b/src/main/java/world/bentobox/bentobox/blueprints/worldedit/BlueprintClipboardReader.java @@ -1,11 +1,10 @@ -package world.bentobox.bentobox.blueprints.converter; +package world.bentobox.bentobox.blueprints.worldedit; import com.sk89q.worldedit.extent.clipboard.Clipboard; import com.sk89q.worldedit.extent.clipboard.io.ClipboardReader; import java.io.IOException; import java.io.InputStream; -import java.io.OutputStream; /** * @since 1.6.0 diff --git a/src/main/java/world/bentobox/bentobox/blueprints/worldedit/BlueprintClipboardWriter.java b/src/main/java/world/bentobox/bentobox/blueprints/worldedit/BlueprintClipboardWriter.java index 92d807cb6..649975914 100644 --- a/src/main/java/world/bentobox/bentobox/blueprints/worldedit/BlueprintClipboardWriter.java +++ b/src/main/java/world/bentobox/bentobox/blueprints/worldedit/BlueprintClipboardWriter.java @@ -1,7 +1,6 @@ -package world.bentobox.bentobox.blueprints.converter; +package world.bentobox.bentobox.blueprints.worldedit; import com.sk89q.worldedit.extent.clipboard.Clipboard; -import com.sk89q.worldedit.extent.clipboard.io.ClipboardReader; import com.sk89q.worldedit.extent.clipboard.io.ClipboardWriter; import java.io.IOException; @@ -11,7 +10,7 @@ import java.io.OutputStream; * @since 1.6.0 * @author CustomEntity */ -public class BlueprintClipboardWriter implements ClipboardWriter{ +public class BlueprintClipboardWriter implements ClipboardWriter { private OutputStream outputStream; diff --git a/src/main/java/world/bentobox/bentobox/blueprints/worldedit/BlueprintSchematicConverter.java b/src/main/java/world/bentobox/bentobox/blueprints/worldedit/BlueprintSchematicConverter.java index 5590f6c65..c0f37e043 100644 --- a/src/main/java/world/bentobox/bentobox/blueprints/worldedit/BlueprintSchematicConverter.java +++ b/src/main/java/world/bentobox/bentobox/blueprints/worldedit/BlueprintSchematicConverter.java @@ -1,4 +1,4 @@ -package world.bentobox.bentobox.blueprints.converter; +package world.bentobox.bentobox.blueprints.worldedit; import com.sk89q.worldedit.extent.clipboard.Clipboard; import com.sk89q.worldedit.extent.clipboard.io.ClipboardFormats; diff --git a/src/main/java/world/bentobox/bentobox/hooks/WorldEditHook.java b/src/main/java/world/bentobox/bentobox/hooks/WorldEditHook.java index 6f81b1e37..7f2783ae8 100644 --- a/src/main/java/world/bentobox/bentobox/hooks/WorldEditHook.java +++ b/src/main/java/world/bentobox/bentobox/hooks/WorldEditHook.java @@ -5,7 +5,7 @@ import com.sk89q.worldedit.extent.clipboard.io.ClipboardFormats; import org.bukkit.Material; import org.eclipse.jdt.annotation.Nullable; import world.bentobox.bentobox.api.hooks.Hook; -import world.bentobox.bentobox.blueprints.BlueprintClipboardFormat; +import world.bentobox.bentobox.blueprints.worldedit.BlueprintClipboardFormat; /** * @since 1.6.0 @@ -14,6 +14,7 @@ import world.bentobox.bentobox.blueprints.BlueprintClipboardFormat; public class WorldEditHook extends Hook { private WorldEdit instance; + private BlueprintClipboardFormat clipboardFormat; public WorldEditHook() { super("WorldEdit", Material.WOODEN_AXE); @@ -23,7 +24,8 @@ public class WorldEditHook extends Hook { public boolean hook() { try { instance = WorldEdit.getInstance(); - ClipboardFormats.registerClipboardFormat(new BlueprintClipboardFormat()); + clipboardFormat = new BlueprintClipboardFormat(); + ClipboardFormats.registerClipboardFormat(clipboardFormat); } catch (Exception | NoClassDefFoundError | NoSuchMethodError e) { return false; }