mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26: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);
|
||||
return false;
|
||||
}
|
||||
if (plot1.move(plot2, new Runnable() {
|
||||
@Override public void run() {
|
||||
MainUtil.sendMessage(player, Captions.SWAP_SUCCESS);
|
||||
if (plot1.isMerged() || plot2.isMerged()) {
|
||||
Captions.SWAP_MERGED.send(player);
|
||||
return false;
|
||||
}
|
||||
}, true)) {
|
||||
if (plot1.move(plot2, () -> MainUtil.sendMessage(player, Captions.SWAP_SUCCESS), true)) {
|
||||
return true;
|
||||
} else {
|
||||
MainUtil.sendMessage(player, Captions.SWAP_OVERLAP);
|
||||
|
@ -237,6 +237,7 @@ public enum Captions {
|
||||
SWAP_DIMENSIONS("$2The proposed areas must have comparable dimensions", "Swap"),
|
||||
SWAP_SYNTAX("$2/plot swap <id>", "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 desc="Comments">
|
||||
INBOX_NOTIFICATION("%s unread messages. Use /plot inbox", "Comment"),
|
||||
|
Loading…
Reference in New Issue
Block a user