mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-09-29 15:17:29 +02:00
Improved the GitHub "download data" messages
added a message to tell the download is done made the "could not connect" message only show if isLogGitHubDownloadData() is set to true
This commit is contained in:
parent
b6fcf511a6
commit
f44b36267d
@ -70,12 +70,19 @@ public class WebManager {
|
||||
topicsContent = repo.getContent("catalog/topics.json").getContent().replaceAll("\\n", "");
|
||||
catalogContent = repo.getContent("catalog/catalog.json").getContent().replaceAll("\\n", "");
|
||||
} catch (IllegalAccessException e) {
|
||||
if (plugin.getSettings().isLogGithubDownloadData()) {
|
||||
plugin.log("Could not connect to GitHub.");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
plugin.logError("An error occurred when downloading from GitHub...");
|
||||
plugin.logError("An error occurred when downloading data from GitHub...");
|
||||
plugin.logStacktrace(e);
|
||||
}
|
||||
|
||||
// People were concerned that the download took ages, so we need to tell them it's over now.
|
||||
if (plugin.getSettings().isLogGithubDownloadData()) {
|
||||
plugin.log("Successfully downloaded data from GitHub.");
|
||||
}
|
||||
|
||||
// Decoding the Base64 encoded contents
|
||||
tagsContent = new String(Base64.getDecoder().decode(tagsContent), StandardCharsets.UTF_8);
|
||||
topicsContent = new String(Base64.getDecoder().decode(topicsContent), StandardCharsets.UTF_8);
|
||||
|
Loading…
Reference in New Issue
Block a user