Skip to content

Commit 2c42a22

Browse files
committed
re-add the periodic saving
1 parent 0a29cec commit 2c42a22

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
mod_name = OneConfig
22
mod_id = oneconfig
33
mod_major_version = 0.2.2-alpha
4-
mod_minor_version = 221
4+
mod_minor_version = 222
55

66
polyfrost.defaults.loom=3
77

src/main/java/cc/polyfrost/oneconfig/internal/config/core/ConfigCore.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)