Improve feedback when placing [as] sign for region that is not added

This commit is contained in:
Thijs Wiefferink 2017-12-22 12:25:30 +01:00
parent 22dcfc76af
commit 1d0472b052
2 changed files with 4 additions and 3 deletions

View File

@ -97,7 +97,7 @@ public final class SignChangeListener implements Listener {
boolean priceSet = fourthLine != null && fourthLine.length() != 0;
boolean durationSet = thirdLine != null && thirdLine.length() != 0;
// check if all the lines are correct
// check if all the lines are correct
if(secondLine == null || secondLine.length() == 0) {
plugin.message(player, "setup-noRegion");
return;
@ -206,7 +206,7 @@ public final class SignChangeListener implements Listener {
}
boolean priceSet = thirdLine != null && thirdLine.length() != 0;
// Check if all the lines are correct
// Check if all the lines are correct
if(secondLine == null || secondLine.length() == 0) {
plugin.message(player, "setup-noRegion");
return;
@ -279,7 +279,7 @@ public final class SignChangeListener implements Listener {
// Get region by secondLine of the sign
region = plugin.getFileManager().getRegion(secondLine);
if(region == null) {
plugin.message(player, "cmd-noRegion", secondLine);
plugin.message(player, "addSign-notRegistered", secondLine);
return;
}
} else {

View File

@ -420,6 +420,7 @@ del-failed: "No permission to remove or not registered: [gray]%0%."
addsign-help: "/as addsign [region] [profile]."
addsign-noSign: "You are not looking at a sign."
addsign-noRegions: "No region found around the sign position."
addSign-notRegistered: "The specified region is not registered in AreaShop: %0% (it first needs to be added to AreaShop before a sign can be added)."
addsign-couldNotDetect: "Found multiple regions around the sign, specify region as extra argument (2 of the regions that were found: %lang:tRegion|%0%|% and %lang:tRegion|%1%|%)."
addsign-couldNotDetectSign: "Found multiple regions around the sign, specify region on the second line (2 of the regions that were found: %lang:tRegion|%0%|% and %lang:tRegion|%1%|%)."
addsign-wrongProfile: "The specified profile does not exist, use one of the following (check config): [gray]%0%."