[FIX] Фикс отправки json запросов к mojang

This commit is contained in:
Gravit 2019-03-22 09:55:30 +07:00
parent c658a85c35
commit a9cc2841ac

View file

@ -58,8 +58,12 @@ public static JsonElement jsonRequest(JsonElement request, URL url) throws IOExc
reader = new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8);
else
reader = new InputStreamReader(connection.getErrorStream(), StandardCharsets.UTF_8);
JsonElement content = parser.parse(reader);
return content;
try {
return parser.parse(reader);
} catch (Exception e)
{
return null;
}
}
private HTTPRequest() {