Fixes a bug that caused /plan setup m address to fail if address ended with a /

This commit is contained in:
Rsl1122 2017-10-02 17:44:21 +03:00
parent 94137252a8
commit 0898102603

View File

@ -51,6 +51,9 @@ public class ManageSetupCommand extends SubCommand {
return true;
}
String address = args[0].toLowerCase();
if (address.endsWith("/")) {
address = address.substring(0, address.length() - 1);
}
try {
plugin.getWebServer().getWebAPI().getAPI(PingWebAPI.class).sendRequest(address);
plugin.getWebServer().getWebAPI().getAPI(RequestSetupWebAPI.class).sendRequest(address);