Use the extract method from config4k in Configuration.kt
This commit is contained in:
parent
5f96c53845
commit
73624dbf2d
|
@ -5,6 +5,7 @@ import com.typesafe.config.ConfigException
|
||||||
import com.typesafe.config.ConfigFactory
|
import com.typesafe.config.ConfigFactory
|
||||||
import com.typesafe.config.ConfigRenderOptions
|
import com.typesafe.config.ConfigRenderOptions
|
||||||
import fr.username404.snowygui.Snowy
|
import fr.username404.snowygui.Snowy
|
||||||
|
import io.github.config4k.extract
|
||||||
import net.minecraft.client.Minecraft
|
import net.minecraft.client.Minecraft
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
|
@ -30,7 +31,7 @@ object Configuration {
|
||||||
Snowy.logs.warn("Could not parse the snowy configuration file, the default configuration will be used instead.")
|
Snowy.logs.warn("Could not parse the snowy configuration file, the default configuration will be used instead.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ConfigFactory.load(result).getConfig("Snowy").resolveWith(baseConf)
|
ConfigFactory.load(result).extract<Config>("Snowy").resolveWith(baseConf)
|
||||||
}
|
}
|
||||||
init {
|
init {
|
||||||
Runtime.getRuntime().addShutdownHook(
|
Runtime.getRuntime().addShutdownHook(
|
||||||
|
|
Loading…
Reference in New Issue