mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 07:06:44 +01:00
Fixed regenallroads in partial plotworlds
This commit is contained in:
parent
fa62ede0e7
commit
2b7adedeeb
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user