@ -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")
|
||||
|
||||
Reference in New Issue
Block a user