File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
src/main/java/cc/polyfrost/oneconfig Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -154,12 +154,6 @@ public void reInitialize() {
154154 * Save current config to file
155155 */
156156 public void save () {
157- if (this instanceof cc .polyfrost .oneconfig .config .elements .SubConfig ) {
158- Mod mod = ConfigCore .getParentMod (this .mod );
159- if (mod == null ) return ;
160- mod .config .save ();
161- return ;
162- }
163157 logger .trace ("Saving config for {}..." , mod .name );
164158
165159 Path profilePath = ConfigUtils .getProfileFile (configFile ).toPath ();
Original file line number Diff line number Diff line change @@ -75,4 +75,14 @@ public static Mod getParentMod(Mod mod) {
7575 }
7676 return null ;
7777 }
78+
79+ static {
80+ Executors .newSingleThreadScheduledExecutor ()
81+ .scheduleAtFixedRate (
82+ ConfigCore ::saveAll ,
83+ 0 ,
84+ 60 ,
85+ TimeUnit .SECONDS
86+ );
87+ }
7888}
You can’t perform that action at this time.
0 commit comments