From f49c664406f8fae6df57f986614421965caa7c77 Mon Sep 17 00:00:00 2001 From: phinner <62483793+phinner@users.noreply.github.com> Date: Tue, 3 Dec 2024 12:01:49 +0100 Subject: [PATCH] fix: Fix crash if using kebab case names in config --- src/main/kotlin/com/xpdustry/nohorny/NoHornyPlugin.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/kotlin/com/xpdustry/nohorny/NoHornyPlugin.kt b/src/main/kotlin/com/xpdustry/nohorny/NoHornyPlugin.kt index ffdcffe..021735c 100644 --- a/src/main/kotlin/com/xpdustry/nohorny/NoHornyPlugin.kt +++ b/src/main/kotlin/com/xpdustry/nohorny/NoHornyPlugin.kt @@ -30,6 +30,7 @@ import arc.Core import arc.util.CommandHandler import com.sksamuel.hoplite.ConfigException import com.sksamuel.hoplite.ConfigLoaderBuilder +import com.sksamuel.hoplite.KebabCaseParamMapper import com.sksamuel.hoplite.addPathSource import com.xpdustry.nohorny.image.ImageProcessorImpl import com.xpdustry.nohorny.image.ImageRendererImpl @@ -71,6 +72,7 @@ public class NoHornyPlugin : Plugin() { .addDefaultDecoders() .addDefaultParamMappers() .addDefaultParsers() + .addParameterMapper(KebabCaseParamMapper) .addPathSource(file) .withReport() .withReportPrintFn(logger::debug)