Prevent a StackOverflowError originating from Bukkit's MemorySection#get/getDefault recursion when the English language file was configured to use itself as defaults.
Description
Modify LangUtil so selectedLangDefaults.setDefaults(englishDefaults) is only applied when the resolved language is not EN_US, avoiding a self-referential defaults chain.
Preserve existing behavior for custom override language files by continuing to call messages.setDefaults(selectedLangDefaults) when an override file exists.
Change made in src/main/java/com/tcoded/playerbountiesplus/util/LangUtil.java.
Testing
Ran ./gradlew test, which failed in this environment due to a Gradle/JDK setup error (25.0.1), so automated test suite could not be completed successfully.
### Motivation
- Prevent a `StackOverflowError` originating from Bukkit's `MemorySection#get/getDefault` recursion when the English language file was configured to use itself as defaults.
### Description
- Modify `LangUtil` so `selectedLangDefaults.setDefaults(englishDefaults)` is only applied when the resolved language is not `EN_US`, avoiding a self-referential defaults chain.
- Preserve existing behavior for custom override language files by continuing to call `messages.setDefaults(selectedLangDefaults)` when an override file exists.
- Change made in `src/main/java/com/tcoded/playerbountiesplus/util/LangUtil.java`.
### Testing
- Ran `./gradlew test`, which failed in this environment due to a Gradle/JDK setup error (`25.0.1`), so automated test suite could not be completed successfully.
------
[Codex Task](https://chatgpt.com/codex/tasks/task_e_69ae830cce50832f864e6a69a86163df)
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
StackOverflowErrororiginating from Bukkit'sMemorySection#get/getDefaultrecursion when the English language file was configured to use itself as defaults.Description
LangUtilsoselectedLangDefaults.setDefaults(englishDefaults)is only applied when the resolved language is notEN_US, avoiding a self-referential defaults chain.messages.setDefaults(selectedLangDefaults)when an override file exists.src/main/java/com/tcoded/playerbountiesplus/util/LangUtil.java.Testing
./gradlew test, which failed in this environment due to a Gradle/JDK setup error (25.0.1), so automated test suite could not be completed successfully.Codex Task