From fb478de164eac4521bbf5eba6e6c82c62bd31055 Mon Sep 17 00:00:00 2001 From: zombachu Date: Wed, 22 May 2019 06:09:31 -1000 Subject: [PATCH 1/3] Update outdated list of files to check on failed world load (#2365) --- .../github/intellectualsites/plotsquared/plot/PlotSquared.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/PlotSquared.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/PlotSquared.java index 7c94060fd..34c80de24 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/PlotSquared.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/PlotSquared.java @@ -255,7 +255,7 @@ import java.util.zip.ZipInputStream; "&c`" + world + "` was not properly loaded - " + IMP.getPluginName() + " will now try to load it properly: "); debug( - "&8 - &7Are you trying to delete this world? Remember to remove it from the settings.yml, bukkit.yml and multiverse worlds.yml"); + "&8 - &7Are you trying to delete this world? Remember to remove it from the worlds.yml, bukkit.yml and multiverse worlds.yml"); debug( "&8 - &7Your world management plugin may be faulty (or non existent)"); PlotSquared.this.IMP.setGenerator(world); From 95cb0d84f08e5782300a692314a971ca76d39006 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Kriv=C3=A1cs=20Schr=C3=B8der?= Date: Wed, 29 May 2019 13:01:29 +0200 Subject: [PATCH 2/3] Fix issue with road generation during unlink Roads should always be created with respect to `current`. --- .../intellectualsites/plotsquared/plot/object/Plot.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/Plot.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/Plot.java index e2f83172e..1b5d6186c 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/Plot.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/Plot.java @@ -949,13 +949,13 @@ public class Plot { for (Plot current : plots) { if (current.getMerged(Direction.EAST)) { manager.createRoadEast(current.area, current); - if (getMerged(Direction.SOUTH)) { + if (current.getMerged(Direction.SOUTH)) { manager.createRoadSouth(current.area, current); - if (getMerged(Direction.SOUTHEAST)) { + if (current.getMerged(Direction.SOUTHEAST)) { manager.createRoadSouthEast(current.area, current); } } - } else if (getMerged(Direction.SOUTH)) { + } else if (current.getMerged(Direction.SOUTH)) { manager.createRoadSouth(current.area, current); } } From 41299e685156311d74661fb9aefa90325dcd47c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Kriv=C3=A1cs=20Schr=C3=B8der?= Date: Wed, 29 May 2019 14:49:27 +0200 Subject: [PATCH 3/3] Fix issue with plot border during merge * `getExtendedTopAbs()` used wrong relative plot for calculating X position. * Not running `finishPlotMerge()` after every merge led to broken roads during a `merge all` --- .../plotsquared/plot/object/Plot.java | 34 ++++++++++++++++--- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/Plot.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/Plot.java index 1b5d6186c..5f1b02e6f 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/Plot.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/Plot.java @@ -1669,7 +1669,7 @@ public class Plot { top.setZ(this.getRelative(Direction.SOUTH).getBottomAbs().getZ() - 1); } if (this.getMerged(Direction.EAST)) { - top.setX(this.getRelative(Direction.SOUTH).getBottomAbs().getX() - 1); + top.setX(this.getRelative(Direction.EAST).getBottomAbs().getX() - 1); } return top; } @@ -2243,6 +2243,13 @@ public class Plot { merged.add(current.getId()); merged.add(other.getId()); toReturn = true; + + if (removeRoads) { + ArrayList ids = new ArrayList<>(); + ids.add(current.getId()); + ids.add(other.getId()); + this.getManager().finishPlotMerge(this.area, ids); + } } } if (max >= 0 && (dir == -1 || dir == 1) && !current.getMerged(Direction.EAST)) { @@ -2255,6 +2262,13 @@ public class Plot { merged.add(current.getId()); merged.add(other.getId()); toReturn = true; + + if (removeRoads) { + ArrayList ids = new ArrayList<>(); + ids.add(current.getId()); + ids.add(other.getId()); + this.getManager().finishPlotMerge(this.area, ids); + } } } if (max >= 0 && (dir == -1 || dir == 2) && !getMerged(Direction.SOUTH)) { @@ -2267,6 +2281,13 @@ public class Plot { merged.add(current.getId()); merged.add(other.getId()); toReturn = true; + + if (removeRoads) { + ArrayList ids = new ArrayList<>(); + ids.add(current.getId()); + ids.add(other.getId()); + this.getManager().finishPlotMerge(this.area, ids); + } } } if (max >= 0 && (dir == -1 || dir == 3) && !getMerged(Direction.WEST)) { @@ -2279,13 +2300,16 @@ public class Plot { merged.add(current.getId()); merged.add(other.getId()); toReturn = true; + + if (removeRoads) { + ArrayList ids = new ArrayList<>(); + ids.add(current.getId()); + ids.add(other.getId()); + this.getManager().finishPlotMerge(this.area, ids); + } } } } - if (removeRoads && toReturn) { - ArrayList ids = new ArrayList<>(merged); - this.getManager().finishPlotMerge(this.area, ids); - } return toReturn; }