diff --git a/FightSystem_14/src/de/steamwar/fightsystem/fight/FightTeam_14.java b/FightSystem_14/src/de/steamwar/fightsystem/fight/FightTeam_14.java index 46d9c9d..403ecc1 100644 --- a/FightSystem_14/src/de/steamwar/fightsystem/fight/FightTeam_14.java +++ b/FightSystem_14/src/de/steamwar/fightsystem/fight/FightTeam_14.java @@ -123,9 +123,9 @@ public class FightTeam_14 { return block.getType() == Material.MOVING_PISTON; } - public static void saveSchem(Schematic schem, Region region) { + public static void saveSchem(Schematic schem, Region region, int minY) { World w = new BukkitWorld(Bukkit.getWorlds().get(0)); - BlockVector3 min = BlockVector3.at(region.getMinX(), region.getMinY(), region.getMinZ()); + BlockVector3 min = BlockVector3.at(region.getMinX(), minY, region.getMinZ()); CuboidRegion cuboidRegion = new CuboidRegion(w, min, BlockVector3.at(region.getMaxX(), region.getMaxY(), region.getMaxZ())); BlockArrayClipboard clipboard = new BlockArrayClipboard(cuboidRegion); EditSession editSession = WorldEdit.getInstance().getEditSessionFactory().getEditSession(w, -1); diff --git a/FightSystem_8/src/de/steamwar/fightsystem/fight/FightTeam_8.java b/FightSystem_8/src/de/steamwar/fightsystem/fight/FightTeam_8.java index 459329a..54812ff 100644 --- a/FightSystem_8/src/de/steamwar/fightsystem/fight/FightTeam_8.java +++ b/FightSystem_8/src/de/steamwar/fightsystem/fight/FightTeam_8.java @@ -125,9 +125,9 @@ public class FightTeam_8 { return block.getType() == Material.PISTON_MOVING_PIECE; } - public static void saveSchem(Schematic schem, Region region) { + public static void saveSchem(Schematic schem, Region region, int minY) { World w = new BukkitWorld(Bukkit.getWorlds().get(0)); - Vector min = new Vector(region.getMinX(), region.getMinY(), region.getMinZ()); + Vector min = new Vector(region.getMinX(), minY, region.getMinZ()); CuboidRegion cuboidRegion = new CuboidRegion(w, min, new Vector(region.getMaxX(), region.getMaxY(), region.getMaxZ())); BlockArrayClipboard clipboard = new BlockArrayClipboard(cuboidRegion); EditSession editSession = WorldEdit.getInstance().getEditSessionFactory().getEditSession(w, -1); diff --git a/FightSystem_Main/src/de/steamwar/fightsystem/listener/PrepareSchem.java b/FightSystem_Main/src/de/steamwar/fightsystem/listener/PrepareSchem.java index b0c3301..5cf1c2d 100644 --- a/FightSystem_Main/src/de/steamwar/fightsystem/listener/PrepareSchem.java +++ b/FightSystem_Main/src/de/steamwar/fightsystem/listener/PrepareSchem.java @@ -48,6 +48,7 @@ public class PrepareSchem implements Listener { super.disable(); Region region = Fight.getBlueTeam().getExtendRegion(); World world = Bukkit.getWorlds().get(0); + int minY = Fight.getBlueTeam().getSchemRegion().getMinY(); Schematic schem; try{ @@ -72,8 +73,8 @@ public class PrepareSchem implements Listener { try{ VersionedRunnable.call( - new VersionedRunnable(() -> FightTeam_8.saveSchem(schem, region), 8), - new VersionedRunnable(() -> FightTeam_14.saveSchem(schem, region), 14)); + new VersionedRunnable(() -> FightTeam_8.saveSchem(schem, region, minY), 8), + new VersionedRunnable(() -> FightTeam_14.saveSchem(schem, region, minY), 14)); }catch(IllegalStateException e){ FightSystem.shutdown(FightSystem.PREFIX + "§cDie Schematic konnte nicht gespeichert werden, Einsenden wird abgebrochen."); return;