aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/cc/polyfrost/oneconfig/config
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/config')
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/config/Config.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/config/Config.java b/src/main/java/cc/polyfrost/oneconfig/config/Config.java
index c2661fa..dd5a578 100644
--- a/src/main/java/cc/polyfrost/oneconfig/config/Config.java
+++ b/src/main/java/cc/polyfrost/oneconfig/config/Config.java
@@ -42,15 +42,25 @@ public class Config {
transient protected final Gson nonProfileSpecificGson = new GsonBuilder().setExclusionStrategies(new NonProfileSpecificExclusionStrategy()).excludeFieldsWithModifiers(Modifier.TRANSIENT).setPrettyPrinting().create();
transient public Mod mod;
public transient boolean hasBeenInitialized = false;
- public boolean enabled = true;
+ public boolean enabled;
/**
* @param modData information about the mod
* @param configFile file where config is stored
+ * @param enabled whether the mod is enabled or not
*/
- public Config(Mod modData, String configFile) {
+ public Config(Mod modData, String configFile, boolean enabled) {
this.configFile = configFile;
this.mod = modData;
+ this.enabled = enabled;
+ }
+
+ /**
+ * @param modData information about the mod
+ * @param configFile file where config is stored
+ */
+ public Config(Mod modData, String configFile) {
+ this(modData, configFile, true);
}
public void initialize() {