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 22d89f4..7d1c6f2 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,5 +14,13 @@ data class Macro( @JvmField var command: String, override var title: String = command ): ButtonImpl() { - override fun execAction() = Minecraft.getInstance().player!!.chat("/$command") + override fun execAction() = with(Minecraft.getInstance().player) { + chat( + "/$command".let { + if (it.startsWith("/say") && !hasPermissions(2)) { + it.drop(5) + } else it + } + ) + } } \ No newline at end of file