From e618407a948476d16f2562996bbc65eb4bee73e9 Mon Sep 17 00:00:00 2001 From: Username404 Date: Sat, 5 Jun 2021 16:35:15 +0200 Subject: [PATCH] Assume that the modmenu screen is not null in ModMenuConf.kt --- .../kotlin/fr/username404/snowygui/fabric/ModMenuConf.kt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/fabric/src/main/kotlin/fr/username404/snowygui/fabric/ModMenuConf.kt b/fabric/src/main/kotlin/fr/username404/snowygui/fabric/ModMenuConf.kt index 9153d8b..51887f8 100644 --- a/fabric/src/main/kotlin/fr/username404/snowygui/fabric/ModMenuConf.kt +++ b/fabric/src/main/kotlin/fr/username404/snowygui/fabric/ModMenuConf.kt @@ -7,10 +7,8 @@ import fr.username404.snowygui.config.configScreenParent import net.minecraft.client.gui.screens.Screen class ModMenuConf: ModMenuApi { - override fun getModConfigScreenFactory(): ConfigScreenFactory { - return ConfigScreenFactory { screen: Screen? -> - configScreenParent = screen!! - SnowyConfigScreen - } + override fun getModConfigScreenFactory() = ConfigScreenFactory { screen: Screen -> + configScreenParent = screen + SnowyConfigScreen } } \ No newline at end of file