The plugin was reporting many missing options because config reads could come from synthesized/default-backed sources and the code contained paths that attempted to auto-create or modify config state instead of using a single canonical file.
The goal is to make config.yml the canonical, read-only source and to fail fast with a clear error if it is missing so users manage the file manually.
Description
Added a file-backed canonical configuration in GameModeInventories by introducing canonicalConfig, the loadCanonicalConfig() method, and overriding getConfig() to return the canonical object.
Made onEnable() fail early and disable the plugin when the canonical config.yml is not present, with a SEVERE log explaining the read-only policy.
Updated GameModeInventoriesConfig.checkConfig() to stop when config.yml is missing and to use plugin.getConfig() (the canonical source) for validation instead of loading or modifying a separate YamlConfiguration instance.
Removed direct calls that previously loaded/instantiated a separate YamlConfiguration for the config (so all config reads now come from the same file-backed object).
Testing
Ran ./gradlew test, which failed due to the build/toolchain environment raising a Gradle/Kotlin Java version parsing error (IllegalArgumentException: 25.0.1), not due to the plugin code changes.
Ran ./gradlew compileJava --stacktrace, which failed with the same Java/Gradle parsing error in this environment, indicating the build system (JDK/Gradle/Kotlin) mismatch rather than functional regressions in the changes.
### Motivation
- The plugin was reporting many missing options because config reads could come from synthesized/default-backed sources and the code contained paths that attempted to auto-create or modify config state instead of using a single canonical file.
- The goal is to make `config.yml` the canonical, read-only source and to fail fast with a clear error if it is missing so users manage the file manually.
### Description
- Added a file-backed canonical configuration in `GameModeInventories` by introducing `canonicalConfig`, the `loadCanonicalConfig()` method, and overriding `getConfig()` to return the canonical object.
- Made `onEnable()` fail early and disable the plugin when the canonical `config.yml` is not present, with a `SEVERE` log explaining the read-only policy.
- Updated `GameModeInventoriesConfig.checkConfig()` to stop when `config.yml` is missing and to use `plugin.getConfig()` (the canonical source) for validation instead of loading or modifying a separate `YamlConfiguration` instance.
- Removed direct calls that previously loaded/instantiated a separate `YamlConfiguration` for the config (so all config reads now come from the same file-backed object).
### Testing
- Ran `./gradlew test`, which failed due to the build/toolchain environment raising a Gradle/Kotlin Java version parsing error (`IllegalArgumentException: 25.0.1`), not due to the plugin code changes.
- Ran `./gradlew compileJava --stacktrace`, which failed with the same Java/Gradle parsing error in this environment, indicating the build system (JDK/Gradle/Kotlin) mismatch rather than functional regressions in the changes.
------
[Codex Task](https://chatgpt.com/codex/tasks/task_e_69c2ad6172ac832fb71ffa5a446d999f)
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.ymlthe canonical, read-only source and to fail fast with a clear error if it is missing so users manage the file manually.Description
GameModeInventoriesby introducingcanonicalConfig, theloadCanonicalConfig()method, and overridinggetConfig()to return the canonical object.onEnable()fail early and disable the plugin when the canonicalconfig.ymlis not present, with aSEVERElog explaining the read-only policy.GameModeInventoriesConfig.checkConfig()to stop whenconfig.ymlis missing and to useplugin.getConfig()(the canonical source) for validation instead of loading or modifying a separateYamlConfigurationinstance.YamlConfigurationfor the config (so all config reads now come from the same file-backed object).Testing
./gradlew test, which failed due to the build/toolchain environment raising a Gradle/Kotlin Java version parsing error (IllegalArgumentException: 25.0.1), not due to the plugin code changes../gradlew compileJava --stacktrace, which failed with the same Java/Gradle parsing error in this environment, indicating the build system (JDK/Gradle/Kotlin) mismatch rather than functional regressions in the changes.Codex Task