From 4231398197eb13a7d8dacb52aad4a47e203a0a14 Mon Sep 17 00:00:00 2001 From: Username404 Date: Tue, 16 Nov 2021 20:51:24 +0100 Subject: [PATCH] Add a null assertion to the Macro data class --- .../main/kotlin/fr/username404/snowygui/gui/feature/Macro.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/main/kotlin/fr/username404/snowygui/gui/feature/Macro.kt b/common/src/main/kotlin/fr/username404/snowygui/gui/feature/Macro.kt index 7d1c6f2..495e060 100644 --- a/common/src/main/kotlin/fr/username404/snowygui/gui/feature/Macro.kt +++ b/common/src/main/kotlin/fr/username404/snowygui/gui/feature/Macro.kt @@ -14,7 +14,7 @@ data class Macro( @JvmField var command: String, override var title: String = command ): ButtonImpl() { - override fun execAction() = with(Minecraft.getInstance().player) { + override fun execAction(): Unit = with(Minecraft.getInstance().player!!) { chat( "/$command".let { if (it.startsWith("/say") && !hasPermissions(2)) {