add update checks

This commit is contained in:
Jack
2024-07-23 02:26:56 -04:00
parent 36ddb10fe2
commit 20bf2d74fc
3 changed files with 45 additions and 2 deletions

View File

@@ -19,7 +19,7 @@ public class ConfigManager {
private final FileConfiguration configFile;
private TimeZone timeZone;
private boolean debug, timeEnabled, weatherEnabled, blockTimeSetCommand, blockWeatherCommand, disableBedsAtNight, disableBedsDuringThunder;
private long timeSyncInterval, weatherSyncInterval;
private long timeSyncInterval, weatherSyncInterval, updateCheckInterval;
private String sunriseSunset, sunriseSunsetLatitude, sunriseSunsetLongitude, apiKey, weatherLatitude, weatherLongitude, disableBedsAtNightMessage, disableBedsDuringThunderMessage, sunriseCustomTime, sunsetCustomTime;
public ConfigManager(RealTimeWeather rtw) {
@@ -71,6 +71,8 @@ public class ConfigManager {
setWeatherEnabled(false);
}
setUpdateCheckInterval(configFile.getLong("updateCheckInterval"));
}
public boolean debugEnabled() {
@@ -308,4 +310,13 @@ public class ConfigManager {
weatherLongitude = value;
rtw.debug("Longitude set to " + value);
}
public void setUpdateCheckInterval(long value) {
updateCheckInterval = value;
rtw.debug("updateCheckInterval set to " + value);
}
public long getUpdateCheckInterval() {
return updateCheckInterval;
}
}