File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
common/src/main/kotlin/com/lambda
config/settings/collections Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,10 @@ package com.lambda.config.settings.collections
22
33import com.google.gson.JsonElement
44import com.google.gson.reflect.TypeToken
5+ import com.lambda.Lambda.LOG
56import com.lambda.Lambda.gson
67import com.lambda.config.AbstractSetting
8+ import com.lambda.util.DynamicReflectionSerializer.dynamicString
79
810class ListSetting <T >(
911 override val name : String ,
@@ -17,6 +19,9 @@ class ListSetting<T>(
1719) {
1820 override fun loadFromJson (serialized : JsonElement ) {
1921 val listType = object : TypeToken <List <T >>() {}.type
20- value = gson.fromJson(serialized, listType)
22+ LOG .info(" Loading $name with value $serialized current value ${value.dynamicString()} $value and type ${listType.typeName} " )
23+ val dese = gson.fromJson<List <T >>(serialized, listType)
24+ value = dese
25+ LOG .info(" Loaded $name with value ${value.dynamicString()} $value and type ${listType.typeName} " )
2126 }
2227}
Original file line number Diff line number Diff line change @@ -2,10 +2,9 @@ package com.lambda.gui.impl.clickgui
22
33import com.lambda.config.Configurable
44import com.lambda.config.configurations.GuiConfig
5- import com.lambda.gui.api.component.WindowComponent
65import com.lambda.gui.impl.clickgui.windows.TagWindow
76
87object GuiConfigurable : Configurable(GuiConfig ) {
98 override val name = " ClickGui"
10- val windows = setting(" windows" , listOf< WindowComponent < * >> (TagWindow ()))
9+ val windows = setting(" windows" , listOf (TagWindow ()))
1110}
You can’t perform that action at this time.
0 commit comments