Added a bunch more settings in config

This commit is contained in:
Florian CUNY 2019-02-21 11:17:39 +01:00
parent 1bdb919734
commit cdb83e576a

View File

@ -176,6 +176,27 @@ public class Settings implements DataObject {
@ConfigEntry(path = "web.github.download-data", since = "1.3.0")
private boolean githubDownloadData = true;
@ConfigComment("Time in minutes between each connection to the GitHub API.")
@ConfigComment("This allows for up-to-the-minute information gathering.")
@ConfigComment("However, as the GitHub API data does not get updated instantly, it is recommended to keep")
@ConfigComment("this value greater than 15 minutes.")
@ConfigComment("Setting this to 0 will make BentoBox download data only at startup.")
@ConfigEntry(path = "web.github.connection-interval", since = "1.3.0")
private int githubConnectionInterval = 60;
@ConfigComment("Toggle whether the downloaded data should be flushed to files.")
@ConfigComment("It helps to prevent previously downloaded data being lost due to a more recent connection that failed")
@ConfigComment("to connect to the GitHub API.")
@ConfigComment("Such files are stored in JSON format and do not usually take up more than a few kilobytes of disk space each.")
@ConfigEntry(path = "web.github.flush-data-to-files", since = "1.3.0")
private boolean githubFlushDataToFiles = true;
@ConfigEntry(path = "web.updater.check-updates.bentobox", since = "1.3.0")
private boolean checkBentoBoxUpdates = true;
@ConfigEntry(path = "web.updater.check-updates.addons", since = "1.3.0")
private boolean checkAddonsUpdates = true;
//---------------------------------------------------------------------------------------/
@ConfigComment("These settings should not be edited")
private String uniqueId = "config";
@ -460,4 +481,36 @@ public class Settings implements DataObject {
public void setGithubDownloadData(boolean githubDownloadData) {
this.githubDownloadData = githubDownloadData;
}
public int getGithubConnectionInterval() {
return githubConnectionInterval;
}
public void setGithubConnectionInterval(int githubConnectionInterval) {
this.githubConnectionInterval = githubConnectionInterval;
}
public boolean isGithubFlushDataToFiles() {
return githubFlushDataToFiles;
}
public void setGithubFlushDataToFiles(boolean githubFlushDataToFiles) {
this.githubFlushDataToFiles = githubFlushDataToFiles;
}
public boolean isCheckBentoBoxUpdates() {
return checkBentoBoxUpdates;
}
public void setCheckBentoBoxUpdates(boolean checkBentoBoxUpdates) {
this.checkBentoBoxUpdates = checkBentoBoxUpdates;
}
public boolean isCheckAddonsUpdates() {
return checkAddonsUpdates;
}
public void setCheckAddonsUpdates(boolean checkAddonsUpdates) {
this.checkAddonsUpdates = checkAddonsUpdates;
}
}