1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-19 19:25:48 +00:00

Re-added conditional github warning messages

This commit is contained in:
TheBusyBiscuit 2020-07-29 23:21:41 +02:00
parent ac4cfd3d68
commit ce18519808

View File

@ -54,8 +54,19 @@ abstract class GitHubConnector {
writeCacheFile(resp.getBody());
}
else {
if (github.isLoggingEnabled()) {
Slimefun.getLogger().log(Level.WARNING, "Failed to fetch {0}: {1} - {2}", new Object[] {repository + getURLSuffix(), resp.getStatus(), resp.getBody()});
}
// It has the cached file, let's just read that then
if (file.exists()) {
JsonNode cache = readCacheFile();
if (cache != null) {
onSuccess(cache);
}
}
}
}
catch (UnirestException e) {
if (github.isLoggingEnabled()) {