mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-20 03:35:51 +00:00
Re-added conditional github warning messages
This commit is contained in:
parent
ac4cfd3d68
commit
ce18519808
@ -54,7 +54,18 @@ abstract class GitHubConnector {
|
|||||||
writeCacheFile(resp.getBody());
|
writeCacheFile(resp.getBody());
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Slimefun.getLogger().log(Level.WARNING, "Failed to fetch {0}: {1} - {2}", new Object[] {repository + getURLSuffix(), resp.getStatus(), resp.getBody()});
|
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) {
|
catch (UnirestException e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user