Fixed invalid servers in placeholders throwing an error instead of just saying the server is invalid

This commit is contained in:
ajgeiss0702
2023-06-13 14:53:33 -07:00
parent c6976a3afb
commit 6e0ac2017c
@@ -121,6 +121,7 @@ public class SpigotAPI extends AjQueueSpigotAPI {
String responseString = response.getResponse();
if(responseString.equals("invalid_server")) {
future.completeExceptionally(new IllegalArgumentException(queueName + " does not exist!"));
return;
}
future.complete(Integer.valueOf(responseString));
});
@@ -148,6 +149,7 @@ public class SpigotAPI extends AjQueueSpigotAPI {
String responseString = response.getResponse();
if(responseString.equals("invalid_server")) {
future.completeExceptionally(new IllegalArgumentException(queueName + " does not exist!"));
return;
}
future.complete(responseString);
});