summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/config
diff options
context:
space:
mode:
authorBrady <thatgravyboat@gmail.com>2024-05-08 08:30:59 -0230
committerGitHub <noreply@github.com>2024-05-08 13:00:59 +0200
commitf9ce2fa19a1178fd9f2e2728d09ac5acd299d69f (patch)
treec344555d1a09f27b74347413f828df71fe95767b /src/main/java/at/hannibal2/skyhanni/config
parent49d918a5d01f102796c2ef52a26e69a41892eb8f (diff)
downloadskyhanni-f9ce2fa19a1178fd9f2e2728d09ac5acd299d69f.tar.gz
skyhanni-f9ce2fa19a1178fd9f2e2728d09ac5acd299d69f.tar.bz2
skyhanni-f9ce2fa19a1178fd9f2e2728d09ac5acd299d69f.zip
Backend: Text API (#1718)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/config')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt
index d3ab8daff..24c85e80c 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt
+++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt
@@ -5,7 +5,7 @@ import at.hannibal2.skyhanni.api.SkillAPI
import at.hannibal2.skyhanni.config.ConfigFileType
import at.hannibal2.skyhanni.config.ConfigGuiManager
import at.hannibal2.skyhanni.config.features.About.UpdateStream
-import at.hannibal2.skyhanni.data.ChatClickActionManager
+import at.hannibal2.skyhanni.utils.chat.ChatClickActionManager
import at.hannibal2.skyhanni.data.ChatManager
import at.hannibal2.skyhanni.data.GardenCropMilestonesCommunityFix
import at.hannibal2.skyhanni.data.GuiEditManager
@@ -82,6 +82,9 @@ import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.SoundUtils
import at.hannibal2.skyhanni.utils.StringUtils.splitLines
import at.hannibal2.skyhanni.utils.TabListData
+import at.hannibal2.skyhanni.utils.chat.Text
+import at.hannibal2.skyhanni.utils.chat.Text.hover
+import at.hannibal2.skyhanni.utils.chat.Text.suggest
import at.hannibal2.skyhanni.utils.repopatterns.RepoPatternGui
import net.minecraft.command.ICommandSender
import net.minecraft.util.BlockPos
@@ -565,9 +568,10 @@ object Commands {
addDescription(category.description)
}
- val commandInfo = ChatUtils.createHoverableChat("$color/$name", hoverText, "/$name", false)
-
- components.add(commandInfo)
+ components.add(Text.text("$color/$name") {
+ this.hover = Text.multiline(hoverText)
+ this.suggest = "/$name"
+ })
components.add(ChatComponentText("ยง7, "))
}
components.add(ChatComponentText("\n "))
@@ -629,7 +633,8 @@ object Commands {
"Are you sure you want to switch to beta? These versions may be less stable.",
onClick = {
UpdateManager.checkUpdate(true, updateStream)
- }
+ },
+ oneTimeClick = true
)
} else {
UpdateManager.checkUpdate(true, updateStream)