Skip to content

Fixed config overwrite and update version#2

Open
jwidess wants to merge 2 commits intoYuWan-030:masterfrom
jwidess:master
Open

Fixed config overwrite and update version#2
jwidess wants to merge 2 commits intoYuWan-030:masterfrom
jwidess:master

Conversation

@jwidess
Copy link

@jwidess jwidess commented Dec 31, 2025

This PR fixes the config.json from being overwritten with defaults on every start of the mod. Now it properly loads the config if it exists. I also updated the trueuuid dependency to v1.0.5 and incremented the mod version to 1.0.3.
NOTE: This functionality already seems to have been implemented in v1.0.3 that is uploaded on Modrinth here, so not sure if something hasn't been committed or what... I say this as using that 1.0.3 version, I had no problems modifying the config, but now, compiling my own version of the mod, I was running into this issue.


AI Overview Below:

This pull request introduces a few minor changes to the OfflineAuth mod, focusing on configuration loading and versioning. The main update is ensuring that the mod configuration is loaded at class initialization, and the mod version is incremented.

Configuration improvements:

  • OfflineAuthHandler.java: The static initializer now calls config.load() before loading auto-login and failure information, ensuring configuration is loaded as soon as the class is initialized.
  • Offlineauth.java: Removed the call to new AuthConfig().save(); from the constructor, as configuration saving is no longer needed at this point.

Version update:

  • gradle.properties: Updated mod_version from 1.0.1 to 1.0.3 to reflect the latest changes.

Fixed overwriting existing config file on every start of the mod. Now changes to the config will actually persist.
trueuuid library from 1.0.2 to 1.0.5 in build.gradle and changed mod_version to 1.0.3 in gradle.properties.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant