Skip to content

Commit

Permalink
saved config on unloading of the world
Browse files Browse the repository at this point in the history
  • Loading branch information
legoraft committed Nov 16, 2023
1 parent c331eec commit 0d9f97b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/com/survivaltweaks/survivalTweaks.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ public void onInitialize() {
CONFIG.load(configDir.resolve("survivaltweaks.properties"));
CONFIG_PATH = configDir.resolve("survivaltweaks.properties");
}));

ServerWorldEvents.UNLOAD.register(((server, world) -> {
CONFIG.save(CONFIG_PATH);
}));
}

}

0 comments on commit 0d9f97b

Please sign in to comment.