Skip to content

Commit

Permalink
Fixed invalid servers in placeholders throwing an error instead of ju…
Browse files Browse the repository at this point in the history
…st saying the server is invalid
  • Loading branch information
ajgeiss0702 committed Oct 21, 2023
1 parent c6976a3 commit 6e0ac20
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -121,6 +121,7 @@ public Future<Integer> getPlayersInQueue(String queueName) {
String responseString = response.getResponse();
if(responseString.equals("invalid_server")) {
future.completeExceptionally(new IllegalArgumentException(queueName + " does not exist!"));
return;
}
future.complete(Integer.valueOf(responseString));
});
Expand Down Expand Up @@ -148,6 +149,7 @@ public Future<String> getServerStatusString(String queueName, UUID player) {
String responseString = response.getResponse();
if(responseString.equals("invalid_server")) {
future.completeExceptionally(new IllegalArgumentException(queueName + " does not exist!"));
return;
}
future.complete(responseString);
});
Expand Down

0 comments on commit 6e0ac20

Please sign in to comment.