aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/features/chat
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2025-09-14 16:37:57 +0200
committerLinnea Gräf <nea@nea.moe>2025-09-14 16:37:57 +0200
commit9abe9f46f04f188037687adb2740b32220ad21b2 (patch)
tree48dbd9cdf48c59853310c0b2e9bc59801522400e /src/main/kotlin/features/chat
parent2851c1d6834fafdaeb009dce2a3485df1388907e (diff)
downloadFirmament-9abe9f46f04f188037687adb2740b32220ad21b2.tar.gz
Firmament-9abe9f46f04f188037687adb2740b32220ad21b2.tar.bz2
Firmament-9abe9f46f04f188037687adb2740b32220ad21b2.zip
snapshot
Diffstat (limited to 'src/main/kotlin/features/chat')
-rw-r--r--src/main/kotlin/features/chat/AutoCompletions.kt4
-rw-r--r--src/main/kotlin/features/chat/ChatLinks.kt4
-rw-r--r--src/main/kotlin/features/chat/CopyChat.kt4
-rw-r--r--src/main/kotlin/features/chat/PartyCommands.kt4
-rw-r--r--src/main/kotlin/features/chat/QuickCommands.kt2
5 files changed, 13 insertions, 5 deletions
diff --git a/src/main/kotlin/features/chat/AutoCompletions.kt b/src/main/kotlin/features/chat/AutoCompletions.kt
index 9e0de40..dac1daa 100644
--- a/src/main/kotlin/features/chat/AutoCompletions.kt
+++ b/src/main/kotlin/features/chat/AutoCompletions.kt
@@ -9,12 +9,14 @@ import moe.nea.firmament.commands.thenExecute
import moe.nea.firmament.events.CommandEvent
import moe.nea.firmament.events.MaskCommands
import moe.nea.firmament.features.FirmamentFeature
-import moe.nea.firmament.gui.config.ManagedConfig
+import moe.nea.firmament.util.data.ManagedConfig
import moe.nea.firmament.repo.RepoManager
import moe.nea.firmament.util.MC
+import moe.nea.firmament.util.data.Config
object AutoCompletions : FirmamentFeature {
+ @Config
object TConfig : ManagedConfig(identifier, Category.CHAT) {
val provideWarpTabCompletion by toggle("warp-complete") { true }
val replaceWarpIsByWarpIsland by toggle("warp-is") { true }
diff --git a/src/main/kotlin/features/chat/ChatLinks.kt b/src/main/kotlin/features/chat/ChatLinks.kt
index 28c526f..6ea07d6 100644
--- a/src/main/kotlin/features/chat/ChatLinks.kt
+++ b/src/main/kotlin/features/chat/ChatLinks.kt
@@ -27,9 +27,10 @@ import moe.nea.firmament.annotations.Subscribe
import moe.nea.firmament.events.ModifyChatEvent
import moe.nea.firmament.events.ScreenRenderPostEvent
import moe.nea.firmament.features.FirmamentFeature
-import moe.nea.firmament.gui.config.ManagedConfig
+import moe.nea.firmament.util.data.ManagedConfig
import moe.nea.firmament.jarvis.JarvisIntegration
import moe.nea.firmament.util.MC
+import moe.nea.firmament.util.data.Config
import moe.nea.firmament.util.render.drawTexture
import moe.nea.firmament.util.transformEachRecursively
import moe.nea.firmament.util.unformattedString
@@ -38,6 +39,7 @@ object ChatLinks : FirmamentFeature {
override val identifier: String
get() = "chat-links"
+ @Config
object TConfig : ManagedConfig(identifier, Category.CHAT) {
val enableLinks by toggle("links-enabled") { true }
val imageEnabled by toggle("image-enabled") { true }
diff --git a/src/main/kotlin/features/chat/CopyChat.kt b/src/main/kotlin/features/chat/CopyChat.kt
index 64f8734..5cd847a 100644
--- a/src/main/kotlin/features/chat/CopyChat.kt
+++ b/src/main/kotlin/features/chat/CopyChat.kt
@@ -4,7 +4,8 @@ import net.minecraft.text.OrderedText
import moe.nea.firmament.annotations.Subscribe
import moe.nea.firmament.events.ClientStartedEvent
import moe.nea.firmament.features.FirmamentFeature
-import moe.nea.firmament.gui.config.ManagedConfig
+import moe.nea.firmament.util.data.Config
+import moe.nea.firmament.util.data.ManagedConfig
import moe.nea.firmament.util.reconstitute
@@ -12,6 +13,7 @@ object CopyChat : FirmamentFeature {
override val identifier: String
get() = "copy-chat"
+ @Config
object TConfig : ManagedConfig(identifier, Category.CHAT) {
val copyChat by toggle("copy-chat") { false }
}
diff --git a/src/main/kotlin/features/chat/PartyCommands.kt b/src/main/kotlin/features/chat/PartyCommands.kt
index de3a0d9..5a80013 100644
--- a/src/main/kotlin/features/chat/PartyCommands.kt
+++ b/src/main/kotlin/features/chat/PartyCommands.kt
@@ -12,10 +12,11 @@ import moe.nea.firmament.commands.thenExecute
import moe.nea.firmament.events.CommandEvent
import moe.nea.firmament.events.PartyMessageReceivedEvent
import moe.nea.firmament.events.ProcessChatEvent
-import moe.nea.firmament.gui.config.ManagedConfig
+import moe.nea.firmament.util.data.ManagedConfig
import moe.nea.firmament.util.ErrorUtil
import moe.nea.firmament.util.MC
import moe.nea.firmament.util.TimeMark
+import moe.nea.firmament.util.data.Config
import moe.nea.firmament.util.tr
import moe.nea.firmament.util.useMatch
@@ -89,6 +90,7 @@ object PartyCommands {
// TODO: at TPS command
}
+ @Config
object TConfig : ManagedConfig("party-commands", Category.CHAT) {
val enable by toggle("enable") { false }
val cooldown by duration("cooldown", 0.seconds, 20.seconds) { 2.seconds }
diff --git a/src/main/kotlin/features/chat/QuickCommands.kt b/src/main/kotlin/features/chat/QuickCommands.kt
index 7963171..88218b4 100644
--- a/src/main/kotlin/features/chat/QuickCommands.kt
+++ b/src/main/kotlin/features/chat/QuickCommands.kt
@@ -16,7 +16,7 @@ import moe.nea.firmament.commands.thenArgument
import moe.nea.firmament.commands.thenExecute
import moe.nea.firmament.events.CommandEvent
import moe.nea.firmament.features.FirmamentFeature
-import moe.nea.firmament.gui.config.ManagedConfig
+import moe.nea.firmament.util.data.ManagedConfig
import moe.nea.firmament.gui.config.ManagedOption
import moe.nea.firmament.util.MC
import moe.nea.firmament.util.SBData