Adjust improper origin -> target message of plot moving

This commit is contained in:
NotMyFault 2021-06-04 19:17:20 +02:00
parent 955341ff9f
commit d8f19cec66
No known key found for this signature in database
GPG Key ID: 158F5701A6AAD00C
4 changed files with 4 additions and 15 deletions

View File

@ -66,11 +66,7 @@ public class Copy extends SubCommand {
return false;
}
if (plot1.equals(plot2)) {
player.sendMessage(TranslatableCaption.of("invalid.not_valid_plot_id"));
player.sendMessage(
TranslatableCaption.of("commandconfig.command_syntax"),
Template.of("value", "/plot copy <X;Z>")
);
player.sendMessage(TranslatableCaption.of("invalid.origin_cant_be_target"));
return false;
}
if (!plot1.getArea().isCompatible(plot2.getArea())) {

View File

@ -92,11 +92,7 @@ public class Move extends SubCommand {
plot2 = area.getPlotAbs(plot1.getId());
}
if (plot1.equals(plot2)) {
player.sendMessage(TranslatableCaption.of("invalid.not_valid_plot_id"));
player.sendMessage(
TranslatableCaption.of("commandconfig.command_syntax"),
Template.of("value", "/plot copy <X;Z>")
);
player.sendMessage(TranslatableCaption.of("invalid.origin_cant_be_target"));
return CompletableFuture.completedFuture(false);
}
if (!plot1.getArea().isCompatible(plot2.getArea()) && (!override || !Permissions

View File

@ -70,11 +70,7 @@ public class Swap extends SubCommand {
return CompletableFuture.completedFuture(false);
}
if (plot1.equals(plot2)) {
player.sendMessage(TranslatableCaption.of("invalid.not_valid_plot_id"));
player.sendMessage(
TranslatableCaption.of("commandconfig.command_syntax"),
Template.of("value", "/plot copy <X;Z>")
);
player.sendMessage(TranslatableCaption.of("invalid.origin_cant_be_target"));
return CompletableFuture.completedFuture(false);
}
if (!plot1.getArea().isCompatible(plot2.getArea())) {

View File

@ -218,6 +218,7 @@
"invalid.not_allowed_block": "<prefix><red>That block is not allowed: <gray><value></gray></red>",
"invalid.not_valid_number": "<prefix><red>That's not a valid number within the range: </red><gray><value></gray>",
"invalid.not_valid_plot_id": "<prefix><red>That's not a valid plot ID.</red>",
"invalid.origin_cant_be_target": "<prefix><red>The origin and target location cannot be the same.</red>",
"invalid.found_no_plots": "<prefix><red>Found no plots with your search query.</red>",
"invalid.number_not_in_range": "<prefix><red>That's not a valid number within the range: <gray>(<min>, <max>)</gray></red>",
"invalid.number_not_positive": "<red>That's not a positive number: <gray><value></gray></red>",