mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-23 12:06:15 +01:00
Include border if possible
This commit is contained in:
parent
05b8b8a750
commit
a24aa2fccb
@ -102,10 +102,17 @@ public class Swap extends SubCommand {
|
||||
final ArrayList<PlotId> selection2 = MainUtil.getPlotSelectionIds(bot2.id, top2.id);
|
||||
|
||||
// Getting selections as location coordinates
|
||||
Location pos1 = MainUtil.getPlotBottomLocAbs(world, bot1.id).add(1, 0, 1);
|
||||
Location pos2 = MainUtil.getPlotTopLocAbs(world, top1.id);
|
||||
Location pos3 = MainUtil.getPlotBottomLocAbs(world, bot2.id).add(1, 0, 1);
|
||||
Location pos4 = MainUtil.getPlotTopLocAbs(world, top2.id);
|
||||
Location pos1 = MainUtil.getPlotBottomLocAbs(world, bot1.id);
|
||||
Location pos2 = MainUtil.getPlotTopLocAbs(world, top1.id).subtract(1, 0, 1);
|
||||
Location pos3 = MainUtil.getPlotBottomLocAbs(world, bot2.id);
|
||||
Location pos4 = MainUtil.getPlotTopLocAbs(world, top2.id).subtract(1, 0, 1);
|
||||
|
||||
if (MainUtil.getPlot(pos2) != null) {
|
||||
pos1.add(1, 0, 1);
|
||||
pos2.add(1, 0, 1);
|
||||
pos3.add(1, 0, 1);
|
||||
pos4.add(1, 0, 1);
|
||||
}
|
||||
|
||||
// Swapping the blocks, states and entites
|
||||
ChunkManager.manager.swap(world, pos1, pos2, pos3, pos4);
|
||||
|
Loading…
Reference in New Issue
Block a user