Skip to content

Commit

Permalink
Fix config reloading
Browse files Browse the repository at this point in the history
  • Loading branch information
Axionize committed Oct 26, 2024
1 parent ac5175b commit b339a53
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ public void load() {
public void enable() {
super.enable();
initializeScheduler();
saveDefaultConfig();
configManager.updateConfig();
configManager.loadConfig(false);
statsManager.init();
checkForUpdates();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ public void reloadConfig() {
try {
if (!configFile.exists()) {
Base.INSTANCE.saveDefaultConfig();
} else {
updateConfig();
}
yamlConfig.load();
config = yamlConfig.getData();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ public void onPreLaunch() {
@Override
public void onInitialize() {
core.enable();
core.initializeScheduler();
core.configManager.loadConfig(false);
core.statsManager.init();
core.checkForUpdates();
ServerLifecycleEvents.SERVER_STOPPING.register((server) -> {
core.scheduler.shutdown();
core.statsManager.getMetrics().shutdown();
Expand Down

0 comments on commit b339a53

Please sign in to comment.