diff options
author | Linnea Gräf <nea@nea.moe> | 2024-12-22 21:17:11 +0100 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-12-22 21:17:11 +0100 |
commit | ebcb06df4092500a38e9a1a8d56d249b5ff37c47 (patch) | |
tree | 18d4de1b244169a0c5165230a0f5f32df37f7668 /src/main/kotlin/util | |
parent | 13994393ed392b33161cd427cc9730c9f1b11e35 (diff) | |
download | Firmament-ebcb06df4092500a38e9a1a8d56d249b5ff37c47.tar.gz Firmament-ebcb06df4092500a38e9a1a8d56d249b5ff37c47.tar.bz2 Firmament-ebcb06df4092500a38e9a1a8d56d249b5ff37c47.zip |
feat: Add party commands
Diffstat (limited to 'src/main/kotlin/util')
-rw-r--r-- | src/main/kotlin/util/MC.kt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/kotlin/util/MC.kt b/src/main/kotlin/util/MC.kt index 294334a..215d2a8 100644 --- a/src/main/kotlin/util/MC.kt +++ b/src/main/kotlin/util/MC.kt @@ -64,6 +64,8 @@ object MC { } fun sendCommand(command: String) { + // TODO: add a queue to this and sendServerChat + ErrorUtil.softCheck("Server commands have an implied /", !command.startsWith("/")) player?.networkHandler?.sendCommand(command) } @@ -96,8 +98,9 @@ object MC { inline val camera: Entity? get() = instance.cameraEntity inline val guiAtlasManager get() = instance.guiAtlasManager inline val world: ClientWorld? get() = TestUtil.unlessTesting { instance.world } + inline val playerName: String? get() = player?.name?.unformattedString inline var screen: Screen? - get() = TestUtil.unlessTesting{ instance.currentScreen } + get() = TestUtil.unlessTesting { instance.currentScreen } set(value) = instance.setScreen(value) val screenName get() = screen?.title?.unformattedString?.trim() inline val handledScreen: HandledScreen<*>? get() = instance.currentScreen as? HandledScreen<*> |