Use the extract method from config4k in Configuration.kt

This commit is contained in:
Username404-59 2021-04-23 16:29:00 +02:00
parent 5f96c53845
commit 73624dbf2d
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 2 additions and 1 deletions

View File

@ -5,6 +5,7 @@ import com.typesafe.config.ConfigException
import com.typesafe.config.ConfigFactory
import com.typesafe.config.ConfigRenderOptions
import fr.username404.snowygui.Snowy
import io.github.config4k.extract
import net.minecraft.client.Minecraft
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.")
}
}
ConfigFactory.load(result).getConfig("Snowy").resolveWith(baseConf)
ConfigFactory.load(result).extract<Config>("Snowy").resolveWith(baseConf)
}
init {
Runtime.getRuntime().addShutdownHook(