aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/data
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal002@users.noreply.github.com>2024-04-24 11:00:06 +0200
committerGitHub <noreply@github.com>2024-04-24 11:00:06 +0200
commit9f7ef2b05adaf526300018bf8fb4f42ca081c483 (patch)
tree6335a960b4cb606cf2ee6067682cc76cd4b375d6 /src/main/java/at/hannibal2/skyhanni/data
parentd4c635abdc2db495659b0a64b3e035cd5f0aa222 (diff)
downloadskyhanni-9f7ef2b05adaf526300018bf8fb4f42ca081c483.tar.gz
skyhanni-9f7ef2b05adaf526300018bf8fb4f42ca081c483.tar.bz2
skyhanni-9f7ef2b05adaf526300018bf8fb4f42ca081c483.zip
Backend: HypixelCommands (#1525)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/data')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/ChatClickActionManager.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/ProfileStorageData.kt5
2 files changed, 7 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/ChatClickActionManager.kt b/src/main/java/at/hannibal2/skyhanni/data/ChatClickActionManager.kt
index 3dc03c5f9..140615e08 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/ChatClickActionManager.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/ChatClickActionManager.kt
@@ -15,6 +15,8 @@ object ChatClickActionManager {
}
private fun ClickableAction.sendToChat() {
+ @Suppress("DEPRECATION")
+ // TODO rename function
ChatUtils.clickableChat(message, "shaction $token", prefix = false)
}
@@ -42,6 +44,6 @@ object ChatClickActionManager {
val message: String,
val onClick: () -> Any,
val oneTime: Boolean = true,
- val expiresAt: SimpleTimeMark = SimpleTimeMark.farFuture()
+ val expiresAt: SimpleTimeMark = SimpleTimeMark.farFuture(),
)
}
diff --git a/src/main/java/at/hannibal2/skyhanni/data/ProfileStorageData.kt b/src/main/java/at/hannibal2/skyhanni/data/ProfileStorageData.kt
index 2e42bb002..97cab2c33 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/ProfileStorageData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/ProfileStorageData.kt
@@ -10,6 +10,7 @@ import at.hannibal2.skyhanni.events.LorenzTickEvent
import at.hannibal2.skyhanni.events.ProfileJoinEvent
import at.hannibal2.skyhanni.events.TabListUpdateEvent
import at.hannibal2.skyhanni.utils.ChatUtils
+import at.hannibal2.skyhanni.utils.HypixelCommands
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.SimpleTimeMark
import at.hannibal2.skyhanni.utils.StringUtils.matchFirst
@@ -71,7 +72,9 @@ object ProfileStorageData {
ChatUtils.clickableChat(
"§cCan not read profile name from tab list! Open /widget and enable Profile Widget. " +
"This is needed for the mod to function! And therefore this warning cannot be disabled",
- command = "widget"
+ onClick = {
+ HypixelCommands.widget()
+ }
)
} else {
ChatUtils.chat(