summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features
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/features
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/features')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/commands/PartyChatCommands.kt7
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonArchitectFeatures.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt12
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/fame/AccountUpgradeReminder.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/fame/CityProjectFeatures.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishManager.kt9
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt6
9 files changed, 33 insertions, 18 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt
index dcac24f63..4d9b94d31 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt
@@ -324,6 +324,7 @@ object GhostCounter {
GhostUtil.importCTGhostCounterData()
},
prefixColor = "§6",
+ oneTimeClick = true
)
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/commands/PartyChatCommands.kt b/src/main/java/at/hannibal2/skyhanni/features/commands/PartyChatCommands.kt
index be986e01d..fca11b45a 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/commands/PartyChatCommands.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/commands/PartyChatCommands.kt
@@ -162,11 +162,14 @@ object PartyChatCommands {
}
"clear" -> {
- ChatUtils.clickableChat("Are you sure you want to do this? Click here to confirm.",
+ ChatUtils.clickableChat(
+ "Are you sure you want to do this? Click here to confirm.",
onClick = {
storage.blacklistedUsers.clear()
ChatUtils.chat("Cleared your ignored players list!")
- })
+ },
+ oneTimeClick = true
+ )
}
else -> blacklistModify(firstArg)
diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonArchitectFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonArchitectFeatures.kt
index d23d5dda9..29d3f8d11 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonArchitectFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonArchitectFeatures.kt
@@ -4,6 +4,7 @@ import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.data.SackAPI.getAmountInSacks
import at.hannibal2.skyhanni.events.LorenzChatEvent
import at.hannibal2.skyhanni.utils.ChatUtils
+import at.hannibal2.skyhanni.utils.HypixelCommands
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName
import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher
@@ -43,12 +44,11 @@ class DungeonArchitectFeatures {
val architectItemAmount = architectsFirstDraftItem.getAmountInSacks()
if (architectItemAmount <= 0) return
- // TODO use hypxel command class (once the pr is merged
ChatUtils.clickableChat(
"§c§lPUZZLE FAILED! §r§b$name §r§efailed a puzzle. \n" +
"§eClick here to get §5Architect's First Draft §7(§e${architectItemAmount}x left§7)",
- "/gfs ARCHITECT_FIRST_DRAFT 1",
- false
+ { HypixelCommands.getFromSacks("ARCHITECT_FIRST_DRAFT", 1) },
+ prefix = false
)
LorenzUtils.sendTitle("§c§lPUZZLE FAILED!", 3.seconds)
event.blockedReason = "puzzle_fail"
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt
index 25fba4ceb..ef1a58c55 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt
@@ -170,11 +170,13 @@ object InquisitorWaypointShare {
sendInquisitor()
} else {
val keyName = KeyboardManager.getKeyName(config.keyBindShare)
- val message =
- "§l§bYou found a Inquisitor! Press §l§chere §l§bor §c$keyName to share the location!"
- ChatUtils.clickableChat(message, onClick = {
- sendInquisitor()
- })
+ val message = "§l§bYou found a Inquisitor! Press §l§chere §l§bor §c$keyName to share the location!"
+ ChatUtils.clickableChat(
+ message, onClick = {
+ sendInquisitor()
+ },
+ oneTimeClick = true
+ )
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt
index 608f241cc..c382e227e 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt
@@ -135,7 +135,8 @@ object HoppityEggsManager {
ChatUtils.clickableChat(
"Click here to share the location of this chocolate egg with the server!",
onClick = { HoppityEggsShared.shareNearbyEggLocation(currentLocation, meal, note) },
- expireAt = 30.seconds.fromNow()
+ expireAt = 30.seconds.fromNow(),
+ oneTimeClick = true
)
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/fame/AccountUpgradeReminder.kt b/src/main/java/at/hannibal2/skyhanni/features/fame/AccountUpgradeReminder.kt
index 74645000a..b26a05094 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/fame/AccountUpgradeReminder.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/fame/AccountUpgradeReminder.kt
@@ -52,7 +52,8 @@ class AccountUpgradeReminder {
"The §a$upgrade §eupgrade has completed! §c(Click to disable these reminders)",
onClick = {
disable()
- }
+ },
+ oneTimeClick = true
)
}
@@ -113,6 +114,7 @@ class AccountUpgradeReminder {
fun disable() {
SkyHanniMod.feature.misc.accountUpgradeReminder = false
+ ChatUtils.chat("Disabled account upgrade reminder.")
}
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/fame/CityProjectFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/fame/CityProjectFeatures.kt
index d9631f55d..2fd91bdf5 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/fame/CityProjectFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/fame/CityProjectFeatures.kt
@@ -82,7 +82,8 @@ class CityProjectFeatures {
"Daily City Project Reminder! (Click here to disable this reminder)",
onClick = {
disable()
- }
+ },
+ oneTimeClick = true
)
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishManager.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishManager.kt
index 9bff45019..564e56edf 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishManager.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishManager.kt
@@ -54,9 +54,12 @@ object TrophyFishManager {
}
}
if (changed) {
- ChatUtils.clickableChat("Click here to load data from NEU PV!", onClick = {
- updateFromNeuPv(savedFishes, neuData)
- })
+ ChatUtils.clickableChat(
+ "Click here to load data from NEU PV!", onClick = {
+ updateFromNeuPv(savedFishes, neuData)
+ },
+ oneTimeClick = true
+ )
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt
index 8c41a5137..c175c219f 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt
@@ -249,7 +249,8 @@ object GardenNextJacobContest {
"§2Click here to submit this year's farming contests. Thank you for helping everyone out!",
onClick = {
shareContests()
- }
+ },
+ oneTimeClick = true
)
}
}
@@ -303,7 +304,8 @@ object GardenNextJacobContest {
config.shareAutomatically = ShareContestsEntry.AUTO
SkyHanniMod.feature.storage.contestSendingAsked = true
ChatUtils.chat("§2Enabled automatic sharing of future contests!")
- }
+ },
+ oneTimeClick = true
)
}
}