diff options
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt | 4 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/commands/tabcomplete/GetFromSacksTabComplete.kt | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt b/src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt index 53cab5d02..433ac6c09 100644 --- a/src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt @@ -90,7 +90,7 @@ object GetFromSackAPI { if (!LorenzUtils.inSkyBlock) return if (queue.isNotEmpty() && lastTimeOfCommand.passedSince() >= minimumDelay) { val item = queue.poll() - ChatUtils.sendCommandToServer("gfs ${item.internalName.asString()} ${item.amount}") + ChatUtils.sendCommandToServer("gfs ${item.internalName.asString().replace('-', ':')} ${item.amount}") lastTimeOfCommand = ChatUtils.getTimeWhenNewlyQueuedMessageGetsExecuted() } } @@ -176,7 +176,7 @@ object GetFromSackAPI { return CommandResult.WRONG_AMOUNT to null } - val itemString = args.dropLast(1).joinToString(" ").uppercase() + val itemString = args.dropLast(1).joinToString(" ").uppercase().replace(':', '-') val item = when { sackListInternalNames.contains(itemString) -> itemString.asInternalName() diff --git a/src/main/java/at/hannibal2/skyhanni/features/commands/tabcomplete/GetFromSacksTabComplete.kt b/src/main/java/at/hannibal2/skyhanni/features/commands/tabcomplete/GetFromSacksTabComplete.kt index 424d72198..331c19fb0 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/commands/tabcomplete/GetFromSacksTabComplete.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/commands/tabcomplete/GetFromSacksTabComplete.kt @@ -25,12 +25,12 @@ object GetFromSacksTabComplete { if (event.senderIsSkyhanni()) return event - if (event.splitMessage.isEmpty()) return event + if (event.splitMessage.size < 3) return event - val rawName = event.splitMessage[1].uppercase() + val rawName = event.splitMessage.drop(1).dropLast(1).joinToString(" ") val realName = rawName.replace("_", " ") if (realName == rawName) return event - if (realName !in GetFromSackAPI.sackListNames) return event + if (realName.uppercase() !in GetFromSackAPI.sackListNames) return event return event.eventWithNewMessage(event.message.replace(rawName, realName)) } |