Add Dev Command
All checks were successful
SteamWarCI Build successful

This commit is contained in:
2025-10-26 00:06:20 +02:00
parent 1344efe18d
commit da20fc10bc

View File

@ -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")