diff options
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt | 2 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/data/ApiDataLoader.kt | 12 |
2 files changed, 12 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 f7c89dc4d..a279f1fc1 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt @@ -4,6 +4,7 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigEditor import at.hannibal2.skyhanni.config.commands.SimpleCommand.ProcessCommandRunnable import at.hannibal2.skyhanni.config.core.GuiScreenElementWrapper +import at.hannibal2.skyhanni.data.ApiDataLoader import at.hannibal2.skyhanni.features.bingo.BingoCardDisplay import at.hannibal2.skyhanni.features.bingo.BingoNextStepHelper import at.hannibal2.skyhanni.features.event.diana.BurrowWarpHelper @@ -46,6 +47,7 @@ object Commands { registerCommand("shtrackcollection") { CollectionCounter.command(it) } registerCommand("shreloadbingodata") { BingoCardDisplay.command() } registerCommand("shprintbingohelper") { BingoNextStepHelper.command() } + registerCommand("shsetapikey") { ApiDataLoader.command(it) } } private fun registerCommand(name: String, function: (Array<String>) -> Unit) { diff --git a/src/main/java/at/hannibal2/skyhanni/data/ApiDataLoader.kt b/src/main/java/at/hannibal2/skyhanni/data/ApiDataLoader.kt index 71a5a66b8..e7f15854a 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/ApiDataLoader.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/ApiDataLoader.kt @@ -19,8 +19,6 @@ import java.util.* class ApiDataLoader { private var currentProfileName = "" - - private var nextApiCallTime = -1L private var currentProfileId = "" @SubscribeEvent @@ -147,4 +145,14 @@ class ApiDataLoader { } } } + + companion object { + private var nextApiCallTime = -1L + + fun command(args: Array<String>) { + SkyHanniMod.feature.hidden.apiKey = args[0] + LorenzUtils.chat("§e[SkyHanni] Api key set via command!") + nextApiCallTime = -1 + } + } } |