From da20fc10bcd1ac586dab9add9e172637c880a7d7 Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Sun, 26 Oct 2025 00:06:20 +0200 Subject: [PATCH] Add Dev Command --- src/main/kotlin/commands/dev/DevCommand.kt | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/main/kotlin/commands/dev/DevCommand.kt b/src/main/kotlin/commands/dev/DevCommand.kt index 0bcbc64..ff6f633 100644 --- a/src/main/kotlin/commands/dev/DevCommand.kt +++ b/src/main/kotlin/commands/dev/DevCommand.kt @@ -47,23 +47,10 @@ class DevCommand : CliktCommand("dev") { override val treatUnknownOptionsAsArgs = true - init { - val osName = System.getProperty("os.name").lowercase() - - val result = when { - "windows" in osName -> "Windows" - listOf("mac", "nix", "sunos", "solaris", "bsd").any { it in osName } -> "*nix" - else -> "Other" - } - - println(result) - } - val server by argument().help("Server Template") val port by option("--port").long().default( - if (System.getProperty("os.name").lowercase() - .let { osName -> listOf("mac", "nix", "sunos", "solaris", "bsd").any { it in osName } } - ) UnixSystem().uid else 2050 + if (System.getProperty("os.name").lowercase() == "windows" + ) 2050 else UnixSystem().uid ).help("Port for Server") val world by option("--world", "-w").help("User World") val plugins by option("--plugins", "-p").help("Plugin Dir")