From df1d947da54f9de88c33ff298a387a2cb4e9a971 Mon Sep 17 00:00:00 2001 From: CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> Date: Fri, 23 Feb 2024 07:49:26 +1100 Subject: Fixed /sendcoords command not working. #1037 --- .../skyhanni/features/commands/SendCoordinatedCommand.kt | 4 ++-- .../at/hannibal2/skyhanni/features/commands/ViewRecipeCommand.kt | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/main/java/at') diff --git a/src/main/java/at/hannibal2/skyhanni/features/commands/SendCoordinatedCommand.kt b/src/main/java/at/hannibal2/skyhanni/features/commands/SendCoordinatedCommand.kt index 5a81747fd..555ed38ee 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/commands/SendCoordinatedCommand.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/commands/SendCoordinatedCommand.kt @@ -12,11 +12,11 @@ class SendCoordinatedCommand { val message = event.message if (message == "/sendcoords") { event.isCanceled = true - ChatUtils.sendCommandToServer(getCoordinates()) + ChatUtils.sendMessageToServer(getCoordinates()) } else if (message.startsWith("/sendcoords ")) { event.isCanceled = true val description = message.split(" ").drop(1).joinToString(" ") - ChatUtils.sendCommandToServer("${getCoordinates()} $description") + ChatUtils.sendMessageToServer("${getCoordinates()} $description") } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/commands/ViewRecipeCommand.kt b/src/main/java/at/hannibal2/skyhanni/features/commands/ViewRecipeCommand.kt index 963115b9b..084060e23 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/commands/ViewRecipeCommand.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/commands/ViewRecipeCommand.kt @@ -14,11 +14,11 @@ object ViewRecipeCommand { fun onMessageSendToServer(event: MessageSendToServerEvent) { if (!config.viewRecipeLowerCase) return val message = event.message + if (!message.startsWith("/viewrecipe ", ignoreCase = true)) return + if (message == message.uppercase()) return - if (message.startsWith("/viewrecipe ", ignoreCase = true)) { - event.isCanceled = true - ChatUtils.sendCommandToServer(message.uppercase()) - } + event.isCanceled = true + ChatUtils.sendCommandToServer(message.uppercase().drop(1)) } val list by lazy { -- cgit