Fix schem height
Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Ursprung
f6df9eecee
Commit
01e1dd8a06
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren