diff options
author | nea <nea@nea.moe> | 2023-06-02 02:32:02 +0200 |
---|---|---|
committer | nea <nea@nea.moe> | 2023-06-02 02:32:02 +0200 |
commit | 3d76538cef0cb150415ef5db734c80fb0dec7e85 (patch) | |
tree | 1fdeaf1f42e4a34d6637c3c74e9993ffcf8e4064 /src/main/kotlin/moe/nea/firmament/commands | |
parent | b61476608ec00642c5dc27cbfe02b4acf26c18d2 (diff) | |
download | Firmament-3d76538cef0cb150415ef5db734c80fb0dec7e85.tar.gz Firmament-3d76538cef0cb150415ef5db734c80fb0dec7e85.tar.bz2 Firmament-3d76538cef0cb150415ef5db734c80fb0dec7e85.zip |
Display rank alongside name
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/commands')
-rw-r--r-- | src/main/kotlin/moe/nea/firmament/commands/rome.kt | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/commands/rome.kt b/src/main/kotlin/moe/nea/firmament/commands/rome.kt index 56ab84d..2d70df0 100644 --- a/src/main/kotlin/moe/nea/firmament/commands/rome.kt +++ b/src/main/kotlin/moe/nea/firmament/commands/rome.kt @@ -66,27 +66,7 @@ fun firmamentCommand() = literal("firmament") { } thenLiteral("pv") { thenExecute { - val me = MC.player!!.uuid - val name = MC.player!!.name.unformattedString - val names = mapOf(me to name) - source.sendFeedback(Text.translatable("firmament.pv.lookingup", name)) - Firmament.coroutineScope.launch { - val profiles = Firmament.httpClient.get { - url { - protocol = URLProtocol.HTTPS - host = "api.hypixel.net" - path("skyblock", "profiles") - parameter("key", "06b68418-71eb-4c2a-bb8a-65ed8bd4d5aa") - parameter("uuid", me.toString()) - } - }.body<Profiles>() - val profile = profiles.profiles.find { it.selected } - if (profile == null) { - source.sendFeedback(Text.translatable("firmament.pv.noprofile", name)) - return@launch - } - ScreenUtil.setScreenLater(CottonClientScreen(ProfileViewer(me, names, profile))) - } + ProfileViewer.onCommand(source, MC.player!!.name.unformattedString) } } thenLiteral("price") { |