renamed Configurator to ConfigManager
This commit is contained in:
@@ -14,7 +14,7 @@ import java.time.zone.ZoneRulesException;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.TimeZone;
|
import java.util.TimeZone;
|
||||||
|
|
||||||
public class Configurator {
|
public class ConfigManager {
|
||||||
private final RealTimeWeather rtw;
|
private final RealTimeWeather rtw;
|
||||||
private final FileConfiguration configFile;
|
private final FileConfiguration configFile;
|
||||||
private TimeZone timeZone;
|
private TimeZone timeZone;
|
||||||
@@ -22,7 +22,7 @@ public class Configurator {
|
|||||||
private long timeSyncInterval, weatherSyncInterval;
|
private long timeSyncInterval, weatherSyncInterval;
|
||||||
private String sunriseSunset, sunriseSunsetLatitude, sunriseSunsetLongitude, apiKey, weatherLatitude, weatherLongitude, disableBedsAtNightMessage, disableBedsDuringThunderMessage, sunriseCustomTime, sunsetCustomTime;
|
private String sunriseSunset, sunriseSunsetLatitude, sunriseSunsetLongitude, apiKey, weatherLatitude, weatherLongitude, disableBedsAtNightMessage, disableBedsDuringThunderMessage, sunriseCustomTime, sunsetCustomTime;
|
||||||
|
|
||||||
public Configurator(RealTimeWeather rtw) {
|
public ConfigManager(RealTimeWeather rtw) {
|
||||||
this.rtw = rtw;
|
this.rtw = rtw;
|
||||||
configFile = rtw.getConfig();
|
configFile = rtw.getConfig();
|
||||||
}
|
}
|
@@ -14,7 +14,7 @@ import java.util.logging.Logger;
|
|||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
public final class RealTimeWeather extends JavaPlugin {
|
public final class RealTimeWeather extends JavaPlugin {
|
||||||
private Logger logger;
|
private Logger logger;
|
||||||
private Configurator config;
|
private ConfigManager config;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
@@ -23,7 +23,7 @@ public final class RealTimeWeather extends JavaPlugin {
|
|||||||
|
|
||||||
logger.info("Loading configuration...");
|
logger.info("Loading configuration...");
|
||||||
saveDefaultConfig();
|
saveDefaultConfig();
|
||||||
config = new Configurator(this);
|
config = new ConfigManager(this);
|
||||||
config.refreshValues();
|
config.refreshValues();
|
||||||
|
|
||||||
debug("TimeSync: " + config.isTimeEnabled());
|
debug("TimeSync: " + config.isTimeEnabled());
|
||||||
@@ -167,7 +167,7 @@ public final class RealTimeWeather extends JavaPlugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Configurator getConfigurator() {
|
public ConfigManager getConfigurator() {
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user