From 1edbf0204daaa7f5f3d45d7649021e4d1952f93b Mon Sep 17 00:00:00 2001 From: Lilly Rosaline Date: Thu, 8 Dec 2022 23:37:11 -0600 Subject: [PATCH] fix cause of IllegalAccessException --- src/main/kotlin/com/example/example_mod/ExampleMod.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/com/example/example_mod/ExampleMod.kt b/src/main/kotlin/com/example/example_mod/ExampleMod.kt index 7dabc46..4829ea7 100644 --- a/src/main/kotlin/com/example/example_mod/ExampleMod.kt +++ b/src/main/kotlin/com/example/example_mod/ExampleMod.kt @@ -5,10 +5,11 @@ import org.quiltmc.qsl.base.api.entrypoint.ModInitializer import org.slf4j.Logger import org.slf4j.LoggerFactory -object ExampleMod : ModInitializer { - private val LOGGER: Logger = LoggerFactory.getLogger("Example Mod") - +class ExampleMod : ModInitializer { override fun onInitialize(mod: ModContainer) { LOGGER.info("Hello Quilt world from {}!", mod.metadata()?.name()) } + companion object { + private val LOGGER: Logger = LoggerFactory.getLogger("Example Mod") + } }