unmojang: Automatically install authlib-injector when missing #101
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Scenario: user tries to launch an instance with an authlib-injector account, but authlib-injector is not installed on the instance.
Current behavior: a dialog box is shown asking whether the user wants to install authlib-injector. If they check "Don't ask again", missing authlib-injector will always be ignored for that instance. If they click "Yes", launching the instance is cancelled and a dialog to select a version of authlib-injector is shown.
Proposed behavior: the checkbox is changed to "Always do the same for all instances without asking" and controls a global setting called "Missing authlib-injector behavior". The "Yes" button automatically installs the latest version of authlib-injector[0] and continues launching the instance. The global "Missing authlib-injector behavior" setting can be set to:
A custom version of authlib-injector can still be installed in the "Edit Instance" menu, as before.
[0] I couldn't get the launcher to choose the latest version, possibly related to yushijinhun/authlib-injector#219. I'd like to fix this before unmojang is merged to develop, but in the meantime I've changed the metadata server to only list the latest version of authlib-injector, currently 1.2.3.