Treat config.yml as immutable so startup and admin actions do not overwrite user-provided configuration.
Avoid automatic migrations or default-write behavior that could unexpectedly change server configuration.
Surface missing/legacy configuration to server operators via logs so they can update files manually.
Description
GameModeInventories: removed runtime writes that saved defaults or migration flags (removed saveDefaultConfig() and suppressed writes to blocks_conversion_done and creative_world.switch_to) and replaced them with informative log messages.
GameModeInventoriesConfig: converted checkConfig() from writing default/migrated values into config.yml to read-only validation that logs missing or legacy options instead of setting them or calling saveConfig().
GameModeInventoriesCommands: disabled the inline /gmi config toggles that flipped config booleans and saved them, and now reply to admins that config.yml is immutable and must be edited manually.
GameModeInventoriesMessage: fixed updateMessages() to write new message entries into the messages.ymlFileConfiguration (messagesConfig) instead of accidentally writing into the main plugin config.
Testing
Ran a pattern search for config mutation calls (saveDefaultConfig, saveConfig, getConfig().set(...)) and confirmed no remaining writes to config.yml from the modified code (success).
Ran git diff --check to verify no whitespace/patch issues (success).
Attempted a Gradle build with JAVA_HOME set to Java 17; the build failed due to the environment being unable to resolve the Spotless Gradle plugin from configured repositories, which is an infra/plugin resolution issue unrelated to the code changes (failed).
### Motivation
- Treat `config.yml` as immutable so startup and admin actions do not overwrite user-provided configuration.
- Avoid automatic migrations or default-write behavior that could unexpectedly change server configuration.
- Surface missing/legacy configuration to server operators via logs so they can update files manually.
### Description
- GameModeInventories: removed runtime writes that saved defaults or migration flags (removed `saveDefaultConfig()` and suppressed writes to `blocks_conversion_done` and `creative_world.switch_to`) and replaced them with informative log messages.
- GameModeInventoriesConfig: converted `checkConfig()` from writing default/migrated values into `config.yml` to read-only validation that logs missing or legacy options instead of setting them or calling `saveConfig()`.
- GameModeInventoriesCommands: disabled the inline `/gmi` config toggles that flipped config booleans and saved them, and now reply to admins that `config.yml` is immutable and must be edited manually.
- GameModeInventoriesMessage: fixed `updateMessages()` to write new message entries into the `messages.yml` `FileConfiguration` (`messagesConfig`) instead of accidentally writing into the main plugin config.
### Testing
- Ran a pattern search for config mutation calls (`saveDefaultConfig`, `saveConfig`, `getConfig().set(...)`) and confirmed no remaining writes to `config.yml` from the modified code (success).
- Ran `git diff --check` to verify no whitespace/patch issues (success).
- Attempted a Gradle build with `JAVA_HOME` set to Java 17; the build failed due to the environment being unable to resolve the Spotless Gradle plugin from configured repositories, which is an infra/plugin resolution issue unrelated to the code changes (failed).
------
[Codex Task](https://chatgpt.com/codex/tasks/task_e_69c18250ac00832f85fb5d7393f1459f)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Motivation
config.ymlas immutable so startup and admin actions do not overwrite user-provided configuration.Description
saveDefaultConfig()and suppressed writes toblocks_conversion_doneandcreative_world.switch_to) and replaced them with informative log messages.checkConfig()from writing default/migrated values intoconfig.ymlto read-only validation that logs missing or legacy options instead of setting them or callingsaveConfig()./gmiconfig toggles that flipped config booleans and saved them, and now reply to admins thatconfig.ymlis immutable and must be edited manually.updateMessages()to write new message entries into themessages.ymlFileConfiguration(messagesConfig) instead of accidentally writing into the main plugin config.Testing
saveDefaultConfig,saveConfig,getConfig().set(...)) and confirmed no remaining writes toconfig.ymlfrom the modified code (success).git diff --checkto verify no whitespace/patch issues (success).JAVA_HOMEset to Java 17; the build failed due to the environment being unable to resolve the Spotless Gradle plugin from configured repositories, which is an infra/plugin resolution issue unrelated to the code changes (failed).Codex Task