funcrequired_for#

required_for(
version: Version,
game: GameDir | None = None,
) → str#

Return the runtime component a version needs.

Loader versions usually inherit it, so this follows inheritsFrom.

Parameters:
  • version (Version) โ€“ The version.

  • game (GameDir | None) โ€“ The game directory that holds parent versions.

Returns:

The component, or jre-legacy if no version in the chain declares one.

Raises:

UnsupportedError โ€“ A parent version is not installed.

Return type:

str