From 29657e24412baa7be9a1681593593368f92de26f Mon Sep 17 00:00:00 2001 From: Empa <42304516+ItsEmpa@users.noreply.github.com> Date: Sun, 26 May 2024 14:57:16 +0200 Subject: Backend: Use HypixelCommands (#1769) Co-authored-by: CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> --- .../at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features/misc') 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 27ea2bb4c..86ce497fe 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 @@ -15,7 +15,6 @@ import at.hannibal2.skyhanni.events.SecondPassedEvent import at.hannibal2.skyhanni.features.garden.farming.GardenCropSpeed import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper import at.hannibal2.skyhanni.test.GriffinUtils.drawWaypointFilled -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 @@ -174,7 +173,7 @@ object TrevorFeatures { event.chatComponent.siblings.forEach { sibling -> if (sibling.chatStyle.chatClickEvent != null && sibling.chatStyle.chatClickEvent.value.contains("YES")) { lastChatPromptTime = SimpleTimeMark.now() - lastChatPrompt = sibling.chatStyle.chatClickEvent.value.drop(1) + lastChatPrompt = sibling.chatStyle.chatClickEvent.value.substringAfter(" ") } } } @@ -293,7 +292,7 @@ object TrevorFeatures { val timeSince = lastChatPromptTime.passedSince() if (timeSince > 200.milliseconds && timeSince < 5.seconds) { lastChatPromptTime = SimpleTimeMark.farPast() - ChatUtils.sendCommandToServer(lastChatPrompt) + HypixelCommands.chatPrompt(lastChatPrompt) lastChatPrompt = "" timeLastWarped = SimpleTimeMark.now() return -- cgit