From be51d8e1597650e3f30d75787283845435a6d636 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Fri, 22 Feb 2019 14:38:18 +0000 Subject: [PATCH 1/3] Correct artifact id for maven --- Core/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/build.gradle b/Core/build.gradle index 2327ddf81..af9efd311 100644 --- a/Core/build.gradle +++ b/Core/build.gradle @@ -26,14 +26,14 @@ task createPom { pom { project { groupId 'com.github.intellectualsites.plotsquared' - artifactId 'Plotsquared' + artifactId 'Plotsquared-Api' version project.parent.version } }.writeTo("../mvn/com/github/intellectualsites/plotsquared/Plotsquared-Api/${project.parent.version}/Plotsquared-Api-${project.parent.version}.pom") pom { project { groupId 'com.github.intellectualsites.plotsquared' - artifactId 'Plotsquared' + artifactId 'Plotsquared-Api' version 'latest' } }.writeTo("../mvn/com/github/intellectualsites/plotsquared/Plotsquared-Api/latest/Plotsquared-Api-latest.pom") From 7aebd9b74bd3d18a459a7dfd8fd4865da9994608 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Fri, 22 Feb 2019 15:11:35 +0000 Subject: [PATCH 2/3] Set wall filling on merge --- .../plotsquared/plot/generator/ClassicPlotManager.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/ClassicPlotManager.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/ClassicPlotManager.java index 988a6a7b4..5a44f30b2 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/ClassicPlotManager.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/ClassicPlotManager.java @@ -432,7 +432,9 @@ public class ClassicPlotManager extends SquarePlotManager { */ @Override public boolean finishPlotMerge(PlotArea plotArea, List plotIds) { final BlockBucket block = ((ClassicPlotWorld) plotArea).CLAIMED_WALL_BLOCK; + final BlockBucket wallBlock = ((ClassicPlotWorld) plotArea).WALL_FILLING; plotIds.forEach(id -> setWall(plotArea, id, block)); + plotIds.forEach(id -> setWallFilling(plotArea, id, wallBlock)); return true; } From 53e732b4fe6f8af434dcc0dfa666a1dcc2f97dee Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Fri, 22 Feb 2019 15:21:44 +0000 Subject: [PATCH 3/3] Make replacing wall on merge configurable In case people are doing fun things with road schematics etc :) --- .../plotsquared/plot/config/Settings.java | 1 + .../plotsquared/plot/generator/ClassicPlotManager.java | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Settings.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Settings.java index 1f7f6a88d..281e35caf 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Settings.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Settings.java @@ -224,6 +224,7 @@ public class Settings extends Config { @Comment("General settings") public static final class General { @Comment("Display scientific numbers (4.2E8)") public static boolean SCIENTIFIC = false; + @Comment("Replace wall when merging") public static boolean MERGE_REPLACE_WALL = true; } diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/ClassicPlotManager.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/ClassicPlotManager.java index 5a44f30b2..fffe38966 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/ClassicPlotManager.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/ClassicPlotManager.java @@ -1,5 +1,6 @@ package com.github.intellectualsites.plotsquared.plot.generator; +import com.github.intellectualsites.plotsquared.plot.config.Settings; import com.github.intellectualsites.plotsquared.plot.object.*; import com.github.intellectualsites.plotsquared.plot.util.MathMan; import com.github.intellectualsites.plotsquared.plot.util.block.GlobalBlockQueue; @@ -432,9 +433,11 @@ public class ClassicPlotManager extends SquarePlotManager { */ @Override public boolean finishPlotMerge(PlotArea plotArea, List plotIds) { final BlockBucket block = ((ClassicPlotWorld) plotArea).CLAIMED_WALL_BLOCK; - final BlockBucket wallBlock = ((ClassicPlotWorld) plotArea).WALL_FILLING; plotIds.forEach(id -> setWall(plotArea, id, block)); - plotIds.forEach(id -> setWallFilling(plotArea, id, wallBlock)); + if (Settings.General.MERGE_REPLACE_WALL) { + final BlockBucket wallBlock = ((ClassicPlotWorld) plotArea).WALL_FILLING; + plotIds.forEach(id -> setWallFilling(plotArea, id, wallBlock)); + } return true; }