diff options
| author | hannibal2 <24389977+hannibal002@users.noreply.github.com> | 2024-05-02 16:01:39 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-02 16:01:39 +0200 |
| commit | 6c8fc0df08331da7e49796985a1df5f14e6d7ac3 (patch) | |
| tree | 3fb6f00ae187e3197d98de37d72168a860ee4d71 /src/main/java/at/hannibal2/skyhanni/config | |
| parent | 4353efaa3d18a61f49f79273bea63303afcab7e1 (diff) | |
| download | skyhanni-6c8fc0df08331da7e49796985a1df5f14e6d7ac3.tar.gz skyhanni-6c8fc0df08331da7e49796985a1df5f14e6d7ac3.tar.bz2 skyhanni-6c8fc0df08331da7e49796985a1df5f14e6d7ac3.zip | |
Backend: Bazaar Fetcher (#1597)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Co-authored-by: Cal <cwolfson58@gmail.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/config')
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt | 10 | ||||
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/features/dev/DebugConfig.java | 5 |
2 files changed, 13 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt index b8a0f2c54..b4a2c336e 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt @@ -12,6 +12,7 @@ import at.hannibal2.skyhanni.data.GuiEditManager import at.hannibal2.skyhanni.data.PartyAPI import at.hannibal2.skyhanni.data.SackAPI import at.hannibal2.skyhanni.data.TitleManager +import at.hannibal2.skyhanni.data.bazaar.HypixelBazaarFetcher import at.hannibal2.skyhanni.features.bingo.card.BingoCardDisplay import at.hannibal2.skyhanni.features.bingo.card.nextstephelper.BingoNextStepHelper import at.hannibal2.skyhanni.features.chat.Translator @@ -380,6 +381,10 @@ object Commands { "shupdate", "Updates the mod to the specified update stream." ) { forceUpdate(it) } + registerCommand( + "shUpdateBazaarPrices", + "Forcefully updating the bazaar prices right now." + ) { HypixelBazaarFetcher.fetchNow() } } private fun developersDebugFeatures() { @@ -623,8 +628,9 @@ object Commands { } } - private fun registerCommand(name: String, description: String, function: (Array<String>) -> Unit) { - if (commands.any { it.name.equals(name, ignoreCase = true) }) { + private fun registerCommand(rawName: String, description: String, function: (Array<String>) -> Unit) { + val name = rawName.lowercase() + if (commands.any { it.name == name }) { error("The command '$name is already registered!'") } ClientCommandHandler.instance.registerCommand(SimpleCommand(name, createCommand(function))) diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/dev/DebugConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/dev/DebugConfig.java index bbacd341a..6be8812b8 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/dev/DebugConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/dev/DebugConfig.java @@ -66,6 +66,11 @@ public class DebugConfig { public boolean showNpcPrice = false; @Expose + @ConfigOption(name = "Show BZ Price", desc = "Show BZ price in item lore.") + @ConfigEditorBoolean + public boolean showBZPrice = false; + + @Expose @ConfigOption(name = "Show Item UUID", desc = "Show the Unique Identifier of items in the lore.") @ConfigEditorBoolean public boolean showItemUuid = false; |
