diff --git a/PlotSquared/src/com/intellectualcrafters/plot/PlotHelper.java b/PlotSquared/src/com/intellectualcrafters/plot/PlotHelper.java index 5f437fdf7..9f8cdb862 100644 --- a/PlotSquared/src/com/intellectualcrafters/plot/PlotHelper.java +++ b/PlotSquared/src/com/intellectualcrafters/plot/PlotHelper.java @@ -868,6 +868,20 @@ public class PlotHelper { setCuboid(world, new Location(world, pos1.getBlockX(), 1, pos1.getBlockZ()), new Location(world, pos2.getBlockX() + 1, plotworld.PLOT_HEIGHT, pos2.getBlockZ() + 1), filling, filling_data); setCuboid(world, new Location(world, pos1.getBlockX(), plotworld.PLOT_HEIGHT, pos1.getBlockZ()), new Location(world, pos2.getBlockX() + 1, plotworld.PLOT_HEIGHT + 1, pos2.getBlockZ() + 1), plotfloors, plotfloors_data); } else { + + if (min.getBlockX() < plotMinX) { + min.setX(plotMinX); + } + if (min.getBlockZ() < plotMinZ) { + min.setZ(plotMinZ); + } + if (max.getBlockX() > plotMaxX) { + max.setX(plotMaxX); + } + if (max.getBlockX() > plotMaxZ) { + max.setZ(plotMaxZ); + } + setSimpleCuboid(world, new Location(world, plotMinX, 0, plotMinZ), new Location(world, min.getBlockX() + 1, 1, min.getBlockZ() + 1), (short) 7); setSimpleCuboid(world, new Location(world, plotMinX, plotworld.PLOT_HEIGHT + 1, plotMinZ), new Location(world, min.getBlockX() + 1, world.getMaxHeight() + 1, min.getBlockZ() + 1), (short) 0); setCuboid(world, new Location(world, plotMinX, 1, plotMinZ), new Location(world, min.getBlockX() + 1, plotworld.PLOT_HEIGHT + 1, min.getBlockZ() + 1), filling, filling_data); diff --git a/PlotSquared/src/com/intellectualcrafters/plot/commands/Unlink.java b/PlotSquared/src/com/intellectualcrafters/plot/commands/Unlink.java index 299be8e4e..06ecbce8d 100644 --- a/PlotSquared/src/com/intellectualcrafters/plot/commands/Unlink.java +++ b/PlotSquared/src/com/intellectualcrafters/plot/commands/Unlink.java @@ -153,8 +153,8 @@ public class Unlink extends SubCommand { Location pos1 = PlotHelper.getPlotBottomLocAbs(w, id); Location pos2 = PlotHelper.getPlotTopLocAbs(w, id); - int sx = pos2.getBlockX() + 1; - int ex = (sx + this.pathsize) - 1; + int sx = pos2.getBlockX(); + int ex = (sx + this.pathsize); int sz = pos1.getBlockZ() - 1; int ez = pos2.getBlockZ() + 2; @@ -180,8 +180,8 @@ public class Unlink extends SubCommand { Location pos1 = PlotHelper.getPlotBottomLocAbs(w, id); Location pos2 = PlotHelper.getPlotTopLocAbs(w, id); - int sz = pos2.getBlockZ() + 1; - int ez = (sz + this.pathsize) - 1; + int sz = pos2.getBlockZ(); + int ez = (sz + this.pathsize); int sx = pos1.getBlockX() - 1; int ex = pos2.getBlockX() + 2;