aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/features/AbstractFeature.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/features/AbstractFeature.java')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/AbstractFeature.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/AbstractFeature.java b/src/main/java/kr/syeyoung/dungeonsguide/features/AbstractFeature.java
index c71639cd..575dee1a 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/features/AbstractFeature.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/features/AbstractFeature.java
@@ -63,7 +63,9 @@ public abstract class AbstractFeature {
public void loadConfig(JsonObject jsonObject) { // gets key, calls it
enabled = jsonObject.get("$enabled").getAsBoolean();
+
for (Map.Entry<String, FeatureParameter> parameterEntry : parameters.entrySet()) {
+ parameterEntry.getValue().setToDefault();
JsonElement element = jsonObject.get(parameterEntry.getKey());
if (element == null) continue;
TypeConverter typeConverter = TypeConverterRegistry.getTypeConverter(parameterEntry.getValue().getValue_type());
@@ -96,6 +98,8 @@ public abstract class AbstractFeature {
return "base." + key ;
}
+ public void onParameterReset() {}
+
public boolean isDisyllable() {
return true;
}