From 18ebd21cb0f97dea8367e65002e0bf32e5c686e2 Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Fri, 19 Jan 2024 01:42:56 +0100 Subject: Add label to /firm sendcoords --- src/main/kotlin/moe/nea/firmament/commands/rome.kt | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/main/kotlin/moe/nea/firmament/commands/rome.kt b/src/main/kotlin/moe/nea/firmament/commands/rome.kt index b175d4b..eeb5f3e 100644 --- a/src/main/kotlin/moe/nea/firmament/commands/rome.kt +++ b/src/main/kotlin/moe/nea/firmament/commands/rome.kt @@ -9,7 +9,10 @@ package moe.nea.firmament.commands import com.mojang.brigadier.CommandDispatcher import com.mojang.brigadier.arguments.StringArgumentType.string import io.ktor.client.statement.* +import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource +import net.minecraft.text.Text import moe.nea.firmament.apis.UrsaManager +import moe.nea.firmament.features.inventory.buttons.InventoryButtons import moe.nea.firmament.features.inventory.storageoverlay.StorageOverlayScreen import moe.nea.firmament.features.world.FairySouls import moe.nea.firmament.gui.config.AllConfigsGui @@ -18,10 +21,12 @@ import moe.nea.firmament.gui.config.ManagedOption import moe.nea.firmament.gui.profileviewer.ProfileViewer import moe.nea.firmament.repo.HypixelStaticData import moe.nea.firmament.repo.RepoManager -import moe.nea.firmament.util.* -import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource -import net.minecraft.text.Text -import moe.nea.firmament.features.inventory.buttons.InventoryButtons +import moe.nea.firmament.util.FirmFormatters +import moe.nea.firmament.util.MC +import moe.nea.firmament.util.SBData +import moe.nea.firmament.util.ScreenUtil +import moe.nea.firmament.util.SkyblockId +import moe.nea.firmament.util.unformattedString fun firmamentCommand() = literal("firmament") { @@ -95,6 +100,12 @@ fun firmamentCommand() = literal("firmament") { val p = MC.player ?: return@thenExecute MC.sendServerChat("x: ${p.blockX}, y: ${p.blockY}, z: ${p.blockZ}") } + thenArgument("rest", RestArgumentType) { rest -> + thenExecute { + val p = MC.player ?: return@thenExecute + MC.sendServerChat("x: ${p.blockX}, y: ${p.blockY}, z: ${p.blockZ} ${this[rest]}") + } + } } thenLiteral("storage") { thenExecute { -- cgit