diff --git a/SchematicSystem_14/pom.xml b/SchematicSystem_14/pom.xml
new file mode 100644
index 0000000..98a4957
--- /dev/null
+++ b/SchematicSystem_14/pom.xml
@@ -0,0 +1,48 @@
+
+
+ 4.0.0
+
+
+ steamwar
+ SchematicSystem
+ 1.0
+
+
+ SchematicSystem_14
+ 1.0
+
+
+ src
+
+
+ src
+
+ **/*.java
+ **/*.kt
+
+
+
+
+
+
+
+ steamwar
+ SchematicSystem_API
+ 1.0
+
+
+ steamwar
+ Spigot
+ 1.14
+ provided
+
+
+ steamwar
+ FAWE
+ 1.14
+ provided
+
+
+
\ No newline at end of file
diff --git a/SchematicSystem_14/src/de/steamwar/schematicsystem/CheckSchemType_14.java b/SchematicSystem_14/src/de/steamwar/schematicsystem/CheckSchemType_14.java
new file mode 100644
index 0000000..bae671f
--- /dev/null
+++ b/SchematicSystem_14/src/de/steamwar/schematicsystem/CheckSchemType_14.java
@@ -0,0 +1,11 @@
+package de.steamwar.schematicsystem;
+
+import java.util.List;
+
+class CheckSchemType_14 {
+ private CheckSchemType_14(){}
+
+ static void autoCheck(List errors) {
+ errors.add("In der 1.14 können keine Schematics eingesendet werden");
+ }
+}
diff --git a/SchematicSystem_14/src/de/steamwar/schematicsystem/WorldEdit_14.java b/SchematicSystem_14/src/de/steamwar/schematicsystem/WorldEdit_14.java
new file mode 100644
index 0000000..6d3336b
--- /dev/null
+++ b/SchematicSystem_14/src/de/steamwar/schematicsystem/WorldEdit_14.java
@@ -0,0 +1,39 @@
+package de.steamwar.schematicsystem;
+
+import com.sk89q.worldedit.EditSession;
+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;
+import de.steamwar.sql.NoClipboardException;
+import de.steamwar.sql.Schematic;
+import org.bukkit.Location;
+import org.bukkit.entity.Player;
+
+import java.io.IOException;
+
+class WorldEdit_14 {
+ private WorldEdit_14(){}
+
+ static EditSession pasteSchematic(Player player, Schematic schematic) throws Schematic.WrongVersionException, IOException, NoClipboardException {
+ World weWorld = new BukkitWorld(player.getWorld());
+ Location playerLocation = player.getLocation();
+ Clipboard clipboard = schematic.load();
+ BlockVector3 vector = BlockVector3.at(playerLocation.getBlockX(), playerLocation.getBlockY(), playerLocation.getBlockZ());
+ BlockVector3 offset = clipboard.getRegion().getMinimumPoint().subtract(clipboard.getOrigin());
+ BlockVector3 dimensions = clipboard.getDimensions();
+ BlockVector3 v = vector.subtract(dimensions.getX()/2 - dimensions.getX()%2, 0, dimensions.getZ()).subtract(offset);
+ EditSession e = WorldEdit.getInstance().getEditSessionFactory().getEditSession(weWorld, -1);
+ try {
+ Operations.completeBlindly(new ClipboardHolder(clipboard).createPaste(e).to(v).build());
+ } catch (MaxChangedBlocksException ex) {
+ throw new IOException(ex);
+ }
+ e.flushQueue();
+ return e;
+ }
+}
diff --git a/SchematicSystem_15/pom.xml b/SchematicSystem_15/pom.xml
index 6bee056..365f874 100644
--- a/SchematicSystem_15/pom.xml
+++ b/SchematicSystem_15/pom.xml
@@ -32,6 +32,11 @@
SchematicSystem_API
1.0
+
+ steamwar
+ SchematicSystem_14
+ 1.0
+
steamwar
Spigot
diff --git a/SchematicSystem_15/src/de/steamwar/schematicsystem/WorldEdit_15.java b/SchematicSystem_15/src/de/steamwar/schematicsystem/WorldEdit_15.java
index 5dae94a..6fcc4a4 100644
--- a/SchematicSystem_15/src/de/steamwar/schematicsystem/WorldEdit_15.java
+++ b/SchematicSystem_15/src/de/steamwar/schematicsystem/WorldEdit_15.java
@@ -1,17 +1,8 @@
package de.steamwar.schematicsystem;
import com.sk89q.worldedit.EditSession;
-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;
import de.steamwar.sql.NoClipboardException;
import de.steamwar.sql.Schematic;
-import org.bukkit.Location;
import org.bukkit.entity.Player;
import java.io.IOException;
@@ -20,20 +11,6 @@ class WorldEdit_15 {
private WorldEdit_15(){}
static EditSession pasteSchematic(Player player, Schematic schematic) throws Schematic.WrongVersionException, IOException, NoClipboardException {
- World weWorld = new BukkitWorld(player.getWorld());
- Location playerLocation = player.getLocation();
- Clipboard clipboard = schematic.load();
- BlockVector3 vector = BlockVector3.at(playerLocation.getBlockX(), playerLocation.getBlockY(), playerLocation.getBlockZ());
- BlockVector3 offset = clipboard.getRegion().getMinimumPoint().subtract(clipboard.getOrigin());
- BlockVector3 dimensions = clipboard.getDimensions();
- BlockVector3 v = vector.subtract(dimensions.getX()/2 - dimensions.getX()%2, 0, dimensions.getZ()).subtract(offset);
- EditSession e = WorldEdit.getInstance().getEditSessionFactory().getEditSession(weWorld, -1);
- try {
- Operations.completeBlindly(new ClipboardHolder(clipboard).createPaste(e).to(v).build());
- } catch (MaxChangedBlocksException ex) {
- throw new IOException(ex);
- }
- e.flushQueue();
- return e;
+ return WorldEdit_14.pasteSchematic(player, schematic);
}
}
diff --git a/SchematicSystem_Main/pom.xml b/SchematicSystem_Main/pom.xml
index 8c1a28b..7f5ab24 100644
--- a/SchematicSystem_Main/pom.xml
+++ b/SchematicSystem_Main/pom.xml
@@ -68,6 +68,12 @@
1.0
compile
+
+ steamwar
+ SchematicSystem_14
+ 1.0
+ compile
+
steamwar
SchematicSystem_12
diff --git a/SchematicSystem_Main/src/de/steamwar/schematicsystem/CheckSchemType.java b/SchematicSystem_Main/src/de/steamwar/schematicsystem/CheckSchemType.java
index dd94a92..dcf94ca 100644
--- a/SchematicSystem_Main/src/de/steamwar/schematicsystem/CheckSchemType.java
+++ b/SchematicSystem_Main/src/de/steamwar/schematicsystem/CheckSchemType.java
@@ -63,6 +63,9 @@ public class CheckSchemType implements ICheckSchemType {
case 15:
CheckSchemType_15.autoCheck(schematic, errors, warnings, this);
break;
+ case 14:
+ CheckSchemType_14.autoCheck(errors);
+ break;
default:
CheckSchemType_12.autoCheck(schematic, errors, warnings, this);
}
diff --git a/SchematicSystem_Main/src/de/steamwar/schematicsystem/WorldEdit.java b/SchematicSystem_Main/src/de/steamwar/schematicsystem/WorldEdit.java
index 06a6fb0..10bec52 100644
--- a/SchematicSystem_Main/src/de/steamwar/schematicsystem/WorldEdit.java
+++ b/SchematicSystem_Main/src/de/steamwar/schematicsystem/WorldEdit.java
@@ -15,6 +15,8 @@ public class WorldEdit {
switch(Core.getVersion()){
case 15:
return WorldEdit_15.pasteSchematic(player, schematic);
+ case 14:
+ return WorldEdit_14.pasteSchematic(player, schematic);
default:
return WorldEdit_12.pasteSchematic(player, schematic);
}
diff --git a/pom.xml b/pom.xml
index 6bef6fd..89f08c6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -37,6 +37,7 @@
SchematicSystem_12
+ SchematicSystem_14
SchematicSystem_15
SchematicSystem_API
SchematicSystem_Main