Repository navigation
Make config.yml messages take effect - #5
Merged
Merged
Conversation
getMessage() only ever read lang.yml, so editing messages: in config.yml did nothing. Messages are now resolved by AutoPickupPlugin.resolveMessage: 1. config.yml, when the server's file sets the key to something other than the bundled default (or a key with no bundled default) 2. otherwise lang.yml 3. otherwise the bundled config.yml default Comparing against the bundled default keeps existing lang.yml customisations working: saveDefaultConfig() already wrote every default message into existing servers' config.yml, and those unedited copies must not shadow lang.yml. ActionBarManager resolves messages.actionbar* the same way. Adds 8 tests for the precedence rules using the real bundled config.yml as defaults. Docs, config.yml/lang.yml comments and CHANGELOG updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018syaxkhsW9ioZChSmth9Xx
MrPippi
marked this pull request as ready for review
October 9, 2026 02:17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
getMessage()only ever readlang.yml, so editingmessages:inconfig.ymlhad no effect. Messages are now resolved byAutoPickupPlugin.resolveMessage(path, config, lang):config.yml, when the server's file sets the key to something other than the bundled default, or to a key the bundledconfig.ymldoesn't have (for examplemessages.actionbar)lang.ymlconfig.ymldefaultActionBarManagerresolvesmessages.actionbarandmessages.actionbar-entrythe same way, throughgetMessageTemplate().Why compare against the bundled default instead of "config.yml always wins"
saveDefaultConfig()has already written every default message into existing servers'config.yml. Ifconfig.ymlalways won, those unedited copies would silently override anything an admin had customised inlang.yml. With this rule, edits in either file keep working. The one case that changes: if an admin had editedconfig.ymlmessages before (which did nothing until now), those edits start taking effect. The CHANGELOG upgrade notes call this out.Other changes
config.ymlandlang.ymlexplain the precedence.ActionBarManager, which referred tosettings.actionbar-format.Test plan
./mvnw clean verifyon JDK 25: 81 tests (73 existing + 8 new), 0 failuresAutoPickupPluginTestcases use the real bundledconfig.ymlas defaults. They cover: edited config wins, an unedited default doesn't shadowlang.yml, a key missing from the file falls back tolang.yml, a key missing everywhere falls back to the bundled default, a config-only key wins, a lang-only key is used, and an unknown key resolves tonull.messages.toggled-oninconfig.yml, run/ap reload, then/apshows the new text. Revert it and confirm a custom value inlang.ymlis used instead.🤖 Generated with Claude Code
https://claude.ai/code/session_018syaxkhsW9ioZChSmth9Xx
Generated by Claude Code