We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d2f3968 commit 9429adaCopy full SHA for 9429ada
2 files changed
common/src/main/java/dev/xpple/betterconfig/api/ModConfig.java
@@ -125,4 +125,11 @@ public interface ModConfig<P> {
125
* @return {@code true} if the configuration was successfully saved, {@code false} otherwise
126
*/
127
boolean save();
128
+
129
+ /**
130
+ * Reload this configuration. Every config field that is not marked as {@link Config#temporary()}
131
+ * will be set based on the value in the config file. Temporary configs remain unchanged. No
132
+ * change hooks will fire.
133
+ */
134
+ void reload();
135
}
common/src/main/java/dev/xpple/betterconfig/impl/ModConfigImpl.java
@@ -304,4 +304,9 @@ public boolean save() {
304
305
return true;
306
307
308
+ @Override
309
+ public void reload() {
310
+ BetterConfigInternals.init(this);
311
+ }
312
0 commit comments