From b6ef3d00916a836eaca6882add39781283e1f9d7 Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Mon, 18 Nov 2024 16:21:50 +0100 Subject: feat: Allow opening config with just /firm --- src/main/kotlin/commands/rome.kt | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'src/main/kotlin/commands/rome.kt') diff --git a/src/main/kotlin/commands/rome.kt b/src/main/kotlin/commands/rome.kt index a690e1f..13acb3c 100644 --- a/src/main/kotlin/commands/rome.kt +++ b/src/main/kotlin/commands/rome.kt @@ -3,14 +3,7 @@ package moe.nea.firmament.commands import com.mojang.brigadier.CommandDispatcher import com.mojang.brigadier.arguments.StringArgumentType.string import io.ktor.client.statement.bodyAsText -import java.nio.file.Path import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource -import kotlin.io.path.exists -import kotlin.io.path.fileSize -import kotlin.io.path.isDirectory -import kotlin.io.path.isReadable -import kotlin.io.path.isRegularFile -import kotlin.io.path.listDirectoryEntries import net.minecraft.nbt.NbtOps import net.minecraft.text.Text import net.minecraft.text.TextCodecs @@ -41,11 +34,7 @@ import moe.nea.firmament.util.SkyblockId import moe.nea.firmament.util.accessors.messages import moe.nea.firmament.util.collections.InstanceList import moe.nea.firmament.util.collections.WeakCache -import moe.nea.firmament.util.darkGreen -import moe.nea.firmament.util.lime import moe.nea.firmament.util.mc.SNbtFormatter -import moe.nea.firmament.util.purple -import moe.nea.firmament.util.red import moe.nea.firmament.util.tr import moe.nea.firmament.util.unformattedString @@ -323,7 +312,10 @@ fun firmamentCommand() = literal("firmament") { source.sendFeedback(tr("firmament.repo.info.location", "Saved location: ${debugPath(RepoDownloadManager.repoSavedLocation)}")) source.sendFeedback(tr("firmament.repo.info.reloadstatus", - "Incomplete: ${formatBool(RepoManager.neuRepo.isIncomplete, trueIsGood = false)}, Unstable ${formatBool(RepoManager.neuRepo.isUnstable, trueIsGood = false)}")) + "Incomplete: ${ + formatBool(RepoManager.neuRepo.isIncomplete, + trueIsGood = false) + }, Unstable ${formatBool(RepoManager.neuRepo.isUnstable, trueIsGood = false)}")) source.sendFeedback(tr("firmament.repo.info.items", "Loaded items: ${RepoManager.neuRepo.items?.items?.size}")) source.sendFeedback(tr("firmament.repo.info.itemcache", @@ -333,6 +325,9 @@ fun firmamentCommand() = literal("firmament") { } } } + thenExecute { + AllConfigsGui.showAllGuis() + } CommandEvent.SubCommand.publish(CommandEvent.SubCommand(this@literal)) } -- cgit