diff options
author | hannibal2 <24389977+hannibal002@users.noreply.github.com> | 2024-04-24 11:00:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-24 11:00:06 +0200 |
commit | 9f7ef2b05adaf526300018bf8fb4f42ca081c483 (patch) | |
tree | 6335a960b4cb606cf2ee6067682cc76cd4b375d6 /src/main/java/at/hannibal2/skyhanni/features/misc | |
parent | d4c635abdc2db495659b0a64b3e035cd5f0aa222 (diff) | |
download | skyhanni-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/features/misc')
3 files changed, 14 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/JoinCrystalHollows.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/JoinCrystalHollows.kt index c1bbb347a..f0cf94264 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/JoinCrystalHollows.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/JoinCrystalHollows.kt @@ -7,6 +7,7 @@ import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent import at.hannibal2.skyhanni.test.GriffinUtils.drawWaypointFilled import at.hannibal2.skyhanni.utils.ChatUtils +import at.hannibal2.skyhanni.utils.HypixelCommands import at.hannibal2.skyhanni.utils.LorenzColor import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland import at.hannibal2.skyhanni.utils.LorenzVec @@ -25,13 +26,18 @@ class JoinCrystalHollows { if (message == "§cYou do not have an active Crystal Hollows pass!") { lastWrongPassTime = System.currentTimeMillis() if (!IslandType.DWARVEN_MINES.isInIsland()) { - ChatUtils.clickableChat("Click here to warp to Dwarven Mines!", "warp mines") + ChatUtils.clickableChat("Click here to warp to Dwarven Mines!", + onClick = { + HypixelCommands.warp("mines") + }) } else { ChatUtils.chat("Buy a §2Crystal Hollows Pass §efrom §5Gwendolyn") } } if (message == "§e[NPC] §5Gwendolyn§f: §rGreat! Now hop on into the Minecart and I'll get you on your way!" && inTime()) { - ChatUtils.clickableChat("Click here to warp to Crystal Hollows!", "warp ch") + ChatUtils.clickableChat("Click here to warp to Crystal Hollows!", onClick = { + HypixelCommands.warp("ch") + }) } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/NoBitsWarning.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/NoBitsWarning.kt index fbaba9095..66ac97792 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/NoBitsWarning.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/NoBitsWarning.kt @@ -1,10 +1,10 @@ package at.hannibal2.skyhanni.features.misc -import akka.event.NoLogging.isWarningEnabled import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.events.BitsUpdateEvent import at.hannibal2.skyhanni.utils.ChatUtils +import at.hannibal2.skyhanni.utils.HypixelCommands import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators import at.hannibal2.skyhanni.utils.SoundUtils @@ -22,7 +22,9 @@ object NoBitsWarning { ChatUtils.clickableChat( "§bNo Bits Available! §eClick to run /bz booster cookie.", - "bz booster cookie" + onClick = { + HypixelCommands.bazaar("booster cookie") + } ) LorenzUtils.sendTitle("§bNo Bits Available", 5.seconds) if (config.notificationSound) SoundUtils.repeatSound(100, 10, createSound("note.pling", 0.6f)) diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt index 0e3bb13ba..b855a49c8 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt @@ -19,6 +19,7 @@ import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.ColorUtils.withAlpha import at.hannibal2.skyhanni.utils.ConfigUtils import at.hannibal2.skyhanni.utils.EntityUtils +import at.hannibal2.skyhanni.utils.HypixelCommands import at.hannibal2.skyhanni.utils.LocationUtils import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayer import at.hannibal2.skyhanni.utils.LorenzColor @@ -294,7 +295,7 @@ object TrevorFeatures { } if (config.warpToTrapper && timeLastWarped.passedSince() > 3.seconds && teleportBlock.passedSince() > 5.seconds) { - ChatUtils.sendCommandToServer("warp trapper") + HypixelCommands.warp("trapper") timeLastWarped = SimpleTimeMark.now() } } |