File tree Expand file tree Collapse file tree 2 files changed +6
-10
lines changed
src/main/java/cc/polyfrost/oneconfig Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -154,6 +154,12 @@ 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+ }
157163 logger .trace ("Saving config for {}..." , mod .name );
158164
159165 Path profilePath = ConfigUtils .getProfileFile (configFile ).toPath ();
Original file line number Diff line number Diff line change @@ -75,14 +75,4 @@ 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- }
8878}
You can’t perform that action at this time.
0 commit comments