From 2b7adedeeb703614d93f6ed4cba65e6a078621ba Mon Sep 17 00:00:00 2001 From: boy0001 Date: Fri, 15 May 2015 00:33:10 +1000 Subject: [PATCH] Fixed regenallroads in partial plotworlds --- .../plot/generator/HybridUtils.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/generator/HybridUtils.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/generator/HybridUtils.java index 464ab3b5b..d5112db8b 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/generator/HybridUtils.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/generator/HybridUtils.java @@ -70,10 +70,20 @@ public abstract class HybridUtils { if (!plotworld.ROAD_SCHEMATIC_ENABLED) { return false; } + boolean toCheck = false; + if (plotworld.TYPE == 2) { + boolean c1 = MainUtil.isPlotArea(new Location(plotworld.worldname, x, 1, z)); + boolean c2 = MainUtil.isPlotArea(new Location(plotworld.worldname, ex, 1, ez)); + if (!c1 && !c2) { + return false; + } + else { + toCheck = c1 ^ c2; + } + } final PlotManager manager = PlotSquared.getPlotManager(world); final PlotId id1 = manager.getPlotId(plotworld, x, 0, z); final PlotId id2 = manager.getPlotId(plotworld, ex, 0, ez); - boolean toCheck = false; if ((id1 == null) || (id2 == null) || (id1 != id2)) { final boolean result = ChunkManager.manager.loadChunk(world, chunk); if (result) { @@ -102,7 +112,7 @@ public abstract class HybridUtils { } boolean condition; if (toCheck) { - condition = manager.getPlotId(plotworld, x + X, 1, z + Z) == null; + condition = MainUtil.isPlotRoad(new Location(plotworld.worldname, x + X, 1, z + Z)); } else { final boolean gx = absX > plotworld.PATH_WIDTH_LOWER; final boolean gz = absZ > plotworld.PATH_WIDTH_LOWER;