Make replacing wall on merge configurable

In case people are doing fun things with road schematics etc :)
This commit is contained in:
dordsor21 2019-02-22 15:21:44 +00:00
parent 7aebd9b74b
commit 53e732b4fe
2 changed files with 6 additions and 2 deletions

View File

@ -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;
}

View File

@ -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<PlotId> 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;
}