Skip to content

Commit

Permalink
fix: SSLHandshakeException
Browse files Browse the repository at this point in the history
Fixed SSLHandshakeException: PKIX path validation failed
  • Loading branch information
GeorgeV220 committed Mar 9, 2023
1 parent ea9bcf1 commit 587c304
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -205,8 +205,10 @@ public String getXUID(@NotNull final PlayerObject playerObject) throws IOExcepti
* @throws IOException When an I/O exception of some sort has occurred.
*/
public UUID getUUID(final String playerName) throws IOException {
Request request = new Request().openConnection(String.format("https://api.minetools.eu/uuid/%s", playerName)).getRequest().finalizeRequest();
if (request.getHttpCode() != 200) {
Request request;
try {
request = new Request().openConnection(String.format("https://api.minetools.eu/uuid/%s", playerName)).getRequest().finalizeRequest();
} catch (IOException ioException) {
request = new Request().openConnection(String.format("https://api.mojang.com/users/profiles/minecraft/%s", playerName)).getRequest().finalizeRequest();
}

Expand Down

0 comments on commit 587c304

Please sign in to comment.