summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/api
diff options
context:
space:
mode:
authorObsidian <108832807+Obsidianninja11@users.noreply.github.com>2024-06-22 03:50:06 -0500
committerGitHub <noreply@github.com>2024-06-22 10:50:06 +0200
commitfcc31674e40ed044f46813c2185f8de29d974932 (patch)
tree36a8721820fa98db8ec1eeb173340ef1f9242d26 /src/main/java/at/hannibal2/skyhanni/api
parent1dff52a075c6873dd53342f4094ecf904d4f9d67 (diff)
downloadskyhanni-fcc31674e40ed044f46813c2185f8de29d974932.tar.gz
skyhanni-fcc31674e40ed044f46813c2185f8de29d974932.tar.bz2
skyhanni-fcc31674e40ed044f46813c2185f8de29d974932.zip
Improvement: Add hover descriptions to many ClickableChat messages (#1919)
Co-authored-by: Cal <cwolfson58@gmail.com> Co-authored-by: CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/api')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt b/src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt
index 7f69e7318..54517905a 100644
--- a/src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt
@@ -42,11 +42,11 @@ object GetFromSackAPI {
private val patternGroup = RepoPattern.group("gfs.chat")
private val fromSacksChatPattern by patternGroup.pattern(
"from",
- "§aMoved §r§e(?<amount>\\d+) (?<item>.+)§r§a from your Sacks to your inventory."
+ "§aMoved §r§e(?<amount>\\d+) (?<item>.+)§r§a from your Sacks to your inventory.",
)
private val missingChatPattern by patternGroup.pattern(
"missing",
- "§cYou have no (?<item>.+) in your Sacks!"
+ "§cYou have no (?<item>.+) in your Sacks!",
)
fun getFromSack(item: NEUInternalName, amount: Int) = getFromSack(item.makePrimitiveStack(amount))
@@ -58,10 +58,10 @@ object GetFromSackAPI {
fun getFromChatMessageSackItems(
item: PrimitiveItemStack,
text: String = "§lCLICK HERE§r§e to grab §ax${item.amount} §9${item.itemName}§e from sacks!",
- ) =
- ChatUtils.clickableChat(text, onClick = {
- getFromSack(item)
- })
+ hover: String = "§eClick to get from sacks!",
+ ) = ChatUtils.clickableChat(
+ text, onClick = { getFromSack(item) }, hover,
+ )
fun getFromSlotClickedSackItems(items: List<PrimitiveItemStack>, slotIndex: Int) = addToInventory(items, slotIndex)
@@ -164,7 +164,7 @@ object GetFromSackAPI {
private fun bazaarMessage(item: String, amount: Int, isRemaining: Boolean = false) = ChatUtils.clickableChat(
"§lCLICK §r§eto get the ${if (isRemaining) "remaining " else ""}§ax${amount} §9$item §efrom bazaar",
- onClick = { HypixelCommands.bazaar(item.removeColor()) }
+ onClick = { HypixelCommands.bazaar(item.removeColor()) }, "§eClick to find on the bazaar!",
)
private fun commandValidator(args: List<String>): Pair<CommandResult, PrimitiveItemStack?> {
@@ -185,7 +185,7 @@ object GetFromSackAPI {
ErrorManager.logErrorStateWithData(
"Couldn't resolve item name",
"Query failed",
- "itemName" to itemString
+ "itemName" to itemString,
)
return CommandResult.INTERNAL_ERROR to null
}