mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-18 11:54:59 -04:00
permanently save start arguments
This commit is contained in:
parent
e2520984c0
commit
5d42f9ce8a
@ -20,6 +20,8 @@ import net.sourceforge.argparse4j.inf.Namespace
|
||||
import kotlin.system.exitProcess
|
||||
|
||||
object CommandLineArguments {
|
||||
lateinit var ARGUMENTS: List<String>
|
||||
private set
|
||||
private val PARSER = with(ArgumentParsers.newFor("Minosoft").build()
|
||||
.defaultHelp(true)
|
||||
.description("An open source minecraft client written from scratch")) {
|
||||
@ -54,6 +56,8 @@ object CommandLineArguments {
|
||||
}
|
||||
|
||||
fun parse(args: Array<String>) {
|
||||
check(!this::ARGUMENTS.isInitialized) { "Already initialized!" }
|
||||
this.ARGUMENTS = args.toList()
|
||||
val namespace: Namespace
|
||||
try {
|
||||
namespace = PARSER.parseArgs(args)
|
||||
|
Loading…
x
Reference in New Issue
Block a user