Skip to content

Add Reload Config command#3

Open
jwidess wants to merge 4 commits intoYuWan-030:masterfrom
jwidess:reload-config
Open

Add Reload Config command#3
jwidess wants to merge 4 commits intoYuWan-030:masterfrom
jwidess:reload-config

Conversation

@jwidess
Copy link

@jwidess jwidess commented Dec 31, 2025

This PR simply adds an /auth reload command to the mod, which allows you to reload the config.json file while running. This makes config changes far easier to test without needing to reboot the server.


AI Overview Below:

This pull request introduces a new /auth reload command to allow reloading the mod configuration at runtime, updates the mod version, and improves initialization. The most significant changes are grouped below:

Feature Addition: Runtime Configuration Reload

  • Added a /auth reload command (permission level 2 required) that reloads the configuration and provides a success message to the user.
  • Added a new localized message reload_success for feedback after reloading the configuration.

Initialization & Configuration Handling

  • Changed static initialization in OfflineAuthHandler to explicitly load the configuration (config.load()) during class loading, ensuring configuration is available before other static initializations.
  • Removed unnecessary call to AuthConfig.save() in the mod's main class constructor, streamlining startup.

Version Update

  • Updated the mod version in gradle.properties from 1.0.1 to 1.0.4.

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.
Added '/reload' command for reloading configuration while running, available to users with permission level 2, and added success message.
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