From cb33bdcc6dbf00e0eca8ffdf2c8f269f482edf7c Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Sun, 26 Oct 2025 00:00:33 +0200 Subject: [PATCH] Add Dev Command --- src/main/kotlin/commands/dev/DevCommand.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/commands/dev/DevCommand.kt b/src/main/kotlin/commands/dev/DevCommand.kt index 8ec7b53..1e8b217 100644 --- a/src/main/kotlin/commands/dev/DevCommand.kt +++ b/src/main/kotlin/commands/dev/DevCommand.kt @@ -48,13 +48,15 @@ class DevCommand : CliktCommand("dev") { override val treatUnknownOptionsAsArgs = true init { - println(System.getProperty("os.name")) + println(if (System.getProperty("os.name").lowercase() + .let { osName -> listOf("mac", "nix", "sunos", "solaris", "bsd").any { it in osName } } + ) UnixSystem().uid else 2050) } val server by argument().help("Server Template") val port by option("--port").long().default( if (System.getProperty("os.name").lowercase() - .let { os -> listOf("mac", "nix", "sunos").any { it in os } } + .let { osName -> listOf("mac", "nix", "sunos", "solaris", "bsd").any { it in osName } } ) UnixSystem().uid else 2050 ).help("Port for Server") val world by option("--world", "-w").help("User World")