Class Options

java.lang.Object
com.hypixel.hytale.server.core.Options

public class Options extends Object
Contains all the command line options that are parsed and can be received from OptionSet received from getOptionSet().
  • Field Details

    • PARSER

      public static final joptsimple.OptionParser PARSER
      The OptionParser used to parse the command line options.
    • HELP

      public static final joptsimple.OptionSpec<Void> HELP
    • VERSION

      public static final joptsimple.OptionSpec<Void> VERSION
    • BARE

      public static final joptsimple.OptionSpec<Void> BARE
    • BOOTSTRAP

      public static final joptsimple.OptionSpec<Void> BOOTSTRAP
      Runs the server in bootstrap mode, loading only the minimal plugin set required to authenticate and download the full server payload (JAR, assets, launcher scripts) into the current working directory. Intended for first-run installs where the user has just the HytaleServer.jar. Implies BARE.
    • LOG_LEVELS

      public static final joptsimple.OptionSpec<Map.Entry<String,Level>> LOG_LEVELS
      The log levels provided to HytaleLoggerBackend.loadLevels(List) Format is >LoggerName>:<Level> multiple can be defined if separated by ',' or multiple --log options If no logger name is provided it will set the log level of the default logger. (eg. --log FINE,PacketLogging:OFF,WorldGenerator:OFF)
    • BIND

      public static final joptsimple.OptionSpec<InetSocketAddress> BIND
      Specify what addresses to bind to. The format is >Port> or >IP>:>Port> (eg. -b 5520 or -b 127.0.0.1:5520)
    • TRANSPORT

      public static final joptsimple.OptionSpec<TransportType> TRANSPORT
    • DISABLE_CPB_BUILD

      public static final joptsimple.OptionSpec<Void> DISABLE_CPB_BUILD
      Disables automatic pregeneration of compact prefab buffers from the assets directory.
    • PREFAB_CACHE_DIRECTORY

      public static final joptsimple.OptionSpec<Path> PREFAB_CACHE_DIRECTORY
      The directory to store cached prefab buffers (LPF files) when loading from immutable asset packs. If not specified, defaults to ".cache/prefabs" relative to the working directory.
    • ASSET_DIRECTORY

      public static final joptsimple.OptionSpec<Path> ASSET_DIRECTORY
      The asset directory that contains the config, models and textures ued by the game.
    • MODS_DIRECTORIES

      public static final joptsimple.OptionSpec<Path> MODS_DIRECTORIES
      Additional mods directories that contain plugins (.jar) and asset packs (directories/.zip). These are loaded in addition to the default "mods" directory in the working directory. Multiple directories can be specified via CLI separated by commas.
    • ALLOW_INSTALL_DIR

      public static final joptsimple.OptionSpec<Void> ALLOW_INSTALL_DIR
      Allows the server to boot with its working directory inside the launcher install path. Registered here so the parser accepts the flag that InstallDirGuard reads.
    • ACCEPT_EARLY_PLUGINS

      public static final joptsimple.OptionSpec<Void> ACCEPT_EARLY_PLUGINS
    • EARLY_PLUGIN_DIRECTORIES

      public static final joptsimple.OptionSpec<Path> EARLY_PLUGIN_DIRECTORIES
      Additional early plugin directories to load from. Multiple directories can be specified separated by commas.
    • VALIDATE_ASSETS

      public static final joptsimple.OptionSpec<Void> VALIDATE_ASSETS
    • VALIDATE_PREFABS

      public static final joptsimple.OptionSpec<ValidationOption> VALIDATE_PREFABS
    • VALIDATE_WORLD_GEN

      public static final joptsimple.OptionSpec<Void> VALIDATE_WORLD_GEN
    • SHUTDOWN_AFTER_VALIDATE

      public static final joptsimple.OptionSpec<Void> SHUTDOWN_AFTER_VALIDATE
    • GENERATE_ASSET_SCHEMA

      public static final joptsimple.OptionSpec<Path> GENERATE_ASSET_SCHEMA
    • GENERATE_CONFIG_SCHEMA

      public static final joptsimple.OptionSpec<Path> GENERATE_CONFIG_SCHEMA
    • WORLD_GEN_DIRECTORY

      public static final joptsimple.OptionSpec<Path> WORLD_GEN_DIRECTORY
      The directory containing the world gen configuration.
    • DISABLE_FILE_WATCHER

      public static final joptsimple.OptionSpec<Void> DISABLE_FILE_WATCHER
      Disables the file-watcher service that watches for changes to the data directory.
    • DISABLE_SENTRY

      public static final joptsimple.OptionSpec<Void> DISABLE_SENTRY
      Disable sending stack traces to sentry.
    • DISABLE_ASSET_COMPARE

      public static final joptsimple.OptionSpec<Void> DISABLE_ASSET_COMPARE
      Disabled the AssetStore compare when reloading assets. This can reduce the asset reload time on the server but may cause assets that have unchanged data (the file content can change without modifying the data) same to be sent in updates.
    • BACKUP

      public static final joptsimple.OptionSpec<Void> BACKUP
      Enable automatic backups according to BACKUP_FREQUENCY_MINUTES.
    • BACKUP_FREQUENCY_MINUTES

      public static final joptsimple.OptionSpec<Integer> BACKUP_FREQUENCY_MINUTES
      Sets how frequent backups occur (every N minutes).
    • BACKUP_DIRECTORY

      public static final joptsimple.OptionSpec<Path> BACKUP_DIRECTORY
      The directory to place the backups in.
    • BACKUP_MAX_COUNT

      public static final joptsimple.OptionSpec<Integer> BACKUP_MAX_COUNT
      The maximum number of recent backups to retain. Additional backups will be deleted, starting with the oldest.
    • BACKUP_ARCHIVE_MAX_COUNT

      public static final joptsimple.OptionSpec<Integer> BACKUP_ARCHIVE_MAX_COUNT
      The maximum number of archived backups to retain. Additional archived backups will be deleted, starting with the oldest.
    • SINGLEPLAYER

      public static final joptsimple.OptionSpec<Void> SINGLEPLAYER
      Tell the server to run in singleplayer mode.
    • OWNER_NAME

      public static final joptsimple.OptionSpec<String> OWNER_NAME
      The name of the singleplayer world owner.
    • OWNER_UUID

      public static final joptsimple.OptionSpec<UUID> OWNER_UUID
      The UUID of the singleplayer world owner.
    • CLIENT_PID

      public static final joptsimple.OptionSpec<Integer> CLIENT_PID
      The PID of the
    • UNIVERSE

      public static final joptsimple.OptionSpec<Path> UNIVERSE
      Loads a universe from a specified path. Used to start a singleplayer world.
    • EVENT_DEBUG

      public static final joptsimple.OptionSpec<Void> EVENT_DEBUG
      Enable event debug by default
    • FORCE_NETWORK_FLUSH

      public static final joptsimple.OptionSpec<Boolean> FORCE_NETWORK_FLUSH
    • MIGRATIONS

      public static final joptsimple.OptionSpec<Map<String,Path>> MIGRATIONS
    • MIGRATE_WORLDS

      public static final joptsimple.OptionSpec<String> MIGRATE_WORLDS
    • BOOT_COMMAND

      public static final joptsimple.OptionSpec<String> BOOT_COMMAND
    • IGNORE_BROKEN_MODS

      public static final joptsimple.OptionSpec<Void> IGNORE_BROKEN_MODS
    • ALLOW_SELF_OP_COMMAND_STRING

      public static final String ALLOW_SELF_OP_COMMAND_STRING
      An option that determines whether the "/op self" command is available.

      Intended for devs and cowboy server admins.

      See Also:
    • ALLOW_SELF_OP_COMMAND

      public static final joptsimple.OptionSpec<Void> ALLOW_SELF_OP_COMMAND
    • AUTH_MODE

      public static final joptsimple.OptionSpec<Options.AuthMode> AUTH_MODE
      Authentication mode for the server. - "authenticated": Require full authentication (mTLS + JWT) - default for release - "offline": Accept development connections only (no auth, singleplayer offline mode) - "insecure": Accept development connections - default for stage
    • SESSION_TOKEN

      public static final joptsimple.OptionSpec<String> SESSION_TOKEN
      Session token for singleplayer mode. Used to authenticate with the Session Service for mutual auth. Passed by the client when starting a singleplayer server.
    • IDENTITY_TOKEN

      public static final joptsimple.OptionSpec<String> IDENTITY_TOKEN
      Identity token for singleplayer mode. JWT from the launcher, used to prove server identity to clients. Passed by the client when starting a singleplayer server.
    • VERIFY_WORLDS

      public static final joptsimple.OptionSpec<Void> VERIFY_WORLDS
    • RECOVERY_MODE

      public static final joptsimple.OptionSpec<Options.RecoveryMode> RECOVERY_MODE
  • Constructor Details

    • Options

      public Options()
  • Method Details

    • getOptionSet

      public static joptsimple.OptionSet getOptionSet()
    • isBare

      public static boolean isBare()
      Returns true if the server is running in bare mode, either because BARE was passed explicitly or because BOOTSTRAP was passed (which implies bare). Bare mode skips loading worlds, binding ports, and creating stray directories on disk.
    • getOrDefault

      public static <T> T getOrDefault(joptsimple.OptionSpec<T> optionSpec, @Nonnull joptsimple.OptionSet optionSet, T def)
      Get the value of an option or default to a value if it isn't specified.
      Type Parameters:
      T - The type of the value.
      Parameters:
      optionSpec - The option spec.
      optionSet - The option set.
      def - The default value.
      Returns:
      The value of the option.
    • parse

      public static boolean parse(String[] args) throws IOException
      Throws:
      IOException