diff options
author | Linnea Gräf <nea@nea.moe> | 2024-10-13 21:46:46 +0200 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-10-13 21:46:46 +0200 |
commit | 4e9b0ded27df8b6ce7f5b2fa1b4b1ddbc1cbd452 (patch) | |
tree | a489fdd97e6c4dde1bd77bf216ed9c2ec2657db3 /src/main/kotlin/commands | |
parent | 0cc77949c907d38497f8cdf6fd8198fe5f0a9440 (diff) | |
download | Firmament-4e9b0ded27df8b6ce7f5b2fa1b4b1ddbc1cbd452.tar.gz Firmament-4e9b0ded27df8b6ce7f5b2fa1b4b1ddbc1cbd452.tar.bz2 Firmament-4e9b0ded27df8b6ce7f5b2fa1b4b1ddbc1cbd452.zip |
Add config categories
Diffstat (limited to 'src/main/kotlin/commands')
-rw-r--r-- | src/main/kotlin/commands/rome.kt | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/kotlin/commands/rome.kt b/src/main/kotlin/commands/rome.kt index cc4f4ba..4f54872 100644 --- a/src/main/kotlin/commands/rome.kt +++ b/src/main/kotlin/commands/rome.kt @@ -17,6 +17,7 @@ import moe.nea.firmament.features.inventory.storageoverlay.StorageOverlayScreen import moe.nea.firmament.features.inventory.storageoverlay.StorageOverviewScreen import moe.nea.firmament.gui.config.AllConfigsGui import moe.nea.firmament.gui.config.BooleanHandler +import moe.nea.firmament.gui.config.ManagedConfig import moe.nea.firmament.gui.config.ManagedOption import moe.nea.firmament.init.MixinPlugin import moe.nea.firmament.repo.HypixelStaticData @@ -39,11 +40,11 @@ fun firmamentCommand() = literal("firmament") { thenLiteral("toggle") { thenArgument("config", string()) { config -> suggestsList { - AllConfigsGui.allConfigs.asSequence().map { it.name }.asIterable() + ManagedConfig.allManagedConfigs.getAll().asSequence().map { it.name }.asIterable() } thenArgument("property", string()) { property -> suggestsList { - (AllConfigsGui.allConfigs.find { it.name == this[config] } ?: return@suggestsList listOf()) + (ManagedConfig.allManagedConfigs.getAll().find { it.name == this[config] } ?: return@suggestsList listOf()) .allOptions.entries.asSequence().filter { it.value.handler is BooleanHandler } .map { it.key } .asIterable() @@ -52,7 +53,7 @@ fun firmamentCommand() = literal("firmament") { val config = this[config] val property = this[property] - val configObj = AllConfigsGui.allConfigs.find { it.name == config } + val configObj = ManagedConfig.allManagedConfigs.getAll().find { it.name == config } if (configObj == null) { source.sendFeedback( Text.stringifiedTranslatable( |