buildParser function

ArgParser buildParser()

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(
      'host',
      abbr: 'H',
      help:
          'The host to run the server on. Defaults to ${SetonixConfig.defaultHost}.',
    )
    ..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',
    )
    ..addFlag(
      'multi-world',
      abbr: 'w',
      negatable: false,
      help: "Enable multi-world support",
      defaultsTo: false,
    );
}