Skip to content

Commit b74674a

Browse files
authored
Enabled ModuleNotifier by default (#294)
1 parent 4b5da1a commit b74674a

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

src/main/kotlin/com/lambda/module/modules/client/ModuleNotifier.kt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,21 @@ import com.lambda.event.events.ModuleEvent
2121
import com.lambda.event.listener.SafeListener.Companion.listen
2222
import com.lambda.module.Module
2323
import com.lambda.module.tag.ModuleTag
24-
import com.lambda.threading.runSafe
2524
import com.lambda.util.Communication.log
2625
import com.lambda.util.Describable
2726
import com.lambda.util.NamedEnum
2827
import com.lambda.util.text.TextBuilder
2928
import com.lambda.util.text.buildText
3029
import com.lambda.util.text.color
3130
import com.lambda.util.text.literal
32-
import net.minecraft.text.Text
3331
import net.minecraft.util.Colors
3432
import java.awt.Color
3533

3634
object ModuleNotifier : Module(
3735
name = "ModuleNotifier",
3836
description = "Notifies you when a module is enabled or disabled",
39-
tag = ModuleTag.CLIENT
37+
tag = ModuleTag.CLIENT,
38+
enabledByDefault = true
4039
) {
4140
var notifyTarget by setting("Notify Target", setOf<NotifyTarget>(NotifyTarget.ActionBar), NotifyTarget.entries.toSet(), description = "Where to send notifications when modules are toggled")
4241

@@ -65,10 +64,10 @@ object ModuleNotifier : Module(
6564

6665
private fun logToTargets(module: Module, action: TextBuilder.() -> Unit) {
6766
if (NotifyTarget.Chat in notifyTarget) {
68-
module.log(TextBuilder().apply(action).build())
67+
module.log(buildText(action))
6968
}
7069
if (NotifyTarget.ActionBar in notifyTarget) {
71-
module.log(TextBuilder().apply(action).build(), inGameOverlay = true)
70+
module.log(buildText(action), inGameOverlay = true)
7271
}
7372
}
7473
}

0 commit comments

Comments
 (0)