mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 15:16:45 +01:00
Disallow swapping ,erged plots
This commit is contained in:
parent
9eb41f05db
commit
8956aedd20
@ -40,11 +40,11 @@ public class Swap extends SubCommand {
|
|||||||
Captions.PLOTWORLD_INCOMPATIBLE.send(player);
|
Captions.PLOTWORLD_INCOMPATIBLE.send(player);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (plot1.move(plot2, new Runnable() {
|
if (plot1.isMerged() || plot2.isMerged()) {
|
||||||
@Override public void run() {
|
Captions.SWAP_MERGED.send(player);
|
||||||
MainUtil.sendMessage(player, Captions.SWAP_SUCCESS);
|
return false;
|
||||||
}
|
}
|
||||||
}, true)) {
|
if (plot1.move(plot2, () -> MainUtil.sendMessage(player, Captions.SWAP_SUCCESS), true)) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
MainUtil.sendMessage(player, Captions.SWAP_OVERLAP);
|
MainUtil.sendMessage(player, Captions.SWAP_OVERLAP);
|
||||||
|
@ -237,6 +237,7 @@ public enum Captions {
|
|||||||
SWAP_DIMENSIONS("$2The proposed areas must have comparable dimensions", "Swap"),
|
SWAP_DIMENSIONS("$2The proposed areas must have comparable dimensions", "Swap"),
|
||||||
SWAP_SYNTAX("$2/plot swap <id>", "Swap"),
|
SWAP_SYNTAX("$2/plot swap <id>", "Swap"),
|
||||||
SWAP_SUCCESS("$4Successfully swapped plots", "Swap"),
|
SWAP_SUCCESS("$4Successfully swapped plots", "Swap"),
|
||||||
|
SWAP_MERGED("$2Merged plots may not be swapped. Please unmerge the plot before performing the swap.", "Swap"),
|
||||||
//</editor-fold>
|
//</editor-fold>
|
||||||
//<editor-fold desc="Comments">
|
//<editor-fold desc="Comments">
|
||||||
INBOX_NOTIFICATION("%s unread messages. Use /plot inbox", "Comment"),
|
INBOX_NOTIFICATION("%s unread messages. Use /plot inbox", "Comment"),
|
||||||
|
Loading…
Reference in New Issue
Block a user