diff options
author | CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> | 2024-02-23 07:49:26 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-22 21:49:26 +0100 |
commit | df1d947da54f9de88c33ff298a387a2cb4e9a971 (patch) | |
tree | 9a0d7e64827a6d9b16a9eea235819d41888943fe /src/main/java | |
parent | 56cb5ef4697acdb2acb9ff1bcbc0e63043b46b92 (diff) | |
download | skyhanni-df1d947da54f9de88c33ff298a387a2cb4e9a971.tar.gz skyhanni-df1d947da54f9de88c33ff298a387a2cb4e9a971.tar.bz2 skyhanni-df1d947da54f9de88c33ff298a387a2cb4e9a971.zip |
Fixed /sendcoords command not working. #1037
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/commands/SendCoordinatedCommand.kt | 4 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/commands/ViewRecipeCommand.kt | 8 |
2 files changed, 6 insertions, 6 deletions
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 { |