diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Swap.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Swap.java index b3ec2ff05..be78e2f68 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Swap.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Swap.java @@ -40,11 +40,11 @@ public class Swap extends SubCommand { Captions.PLOTWORLD_INCOMPATIBLE.send(player); return false; } - if (plot1.move(plot2, new Runnable() { - @Override public void run() { - MainUtil.sendMessage(player, Captions.SWAP_SUCCESS); - } - }, true)) { + if (plot1.isMerged() || plot2.isMerged()) { + Captions.SWAP_MERGED.send(player); + return false; + } + if (plot1.move(plot2, () -> MainUtil.sendMessage(player, Captions.SWAP_SUCCESS), true)) { return true; } else { MainUtil.sendMessage(player, Captions.SWAP_OVERLAP); diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Captions.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Captions.java index 000555a1b..3c5064e70 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Captions.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Captions.java @@ -237,6 +237,7 @@ public enum Captions { SWAP_DIMENSIONS("$2The proposed areas must have comparable dimensions", "Swap"), SWAP_SYNTAX("$2/plot swap ", "Swap"), SWAP_SUCCESS("$4Successfully swapped plots", "Swap"), + SWAP_MERGED("$2Merged plots may not be swapped. Please unmerge the plot before performing the swap.", "Swap"), // // INBOX_NOTIFICATION("%s unread messages. Use /plot inbox", "Comment"),