buildParser function
Implementation
ArgParser buildParser() {
return ArgParser()
..addFlag(
'help',
abbr: 'h',
negatable: false,
help: 'Print this usage information.',
)
..addFlag(
'verbose',
abbr: 'v',
negatable: false,
help: 'Show additional command output.',
)
..addFlag(
'version',
abbr: 'V',
negatable: false,
help: 'Print the tool version.',
)
..addOption(
'port',
abbr: 'p',
help: 'The port to run the server on. Defaults to $kDefaultPort.',
)
..addOption(
'description',
abbr: 'd',
help:
'A description of the server. Will be displayed in the server list.',
)
..addOption('autosave',
abbr: 'a', help: "Disable saving of the world automatically")
..addOption('max-players',
abbr: 'm', help: "Maximum number of players", defaultsTo: '10');
}