fix: keep v1 colour codes out of the import report and unify the no-homes notice - #52
Merged
Merged
Conversation
…omes notice Closes #49
This was referenced Aug 17, 2026
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.
Closes #49
Problem
/import-homes sethomesechoed v1 message settings into chat verbatim. v1's own defaults carry section-sign colour codes, so§4turned the rest of the advice line red (and§kwould scramble it), making a successful import report look like it half failed.Separately, the "you have no homes yet" notice was sent as info from
/homes, as a red error from the homes menu, and with a third wording from/list-homes.Change
messageNote(), which showsChatColor.COLOR_CHARas&, prints the value once, and appends "(colour codes shown as &; copy the original from plugins/SetHomes/config.yml to keep them)" only when a code was actually present. The exact original stays recoverable from v1's own file.tp-cooldownnote says "no v2 equivalent" rather than "no Set Homes Two equivalent".noHomesconfig key withUserInfo.NO_HOMESas the default and send it as info.UserError.NO_HOMESis removed, and/list-homesno longer adds a second usage line.Tests
mvn test: 371 tests, 0 failures, 0 skipped (was 367). New: a§4/§kfixture produces no§in any note and shows&4/&k; a coded message namesplugins/SetHomes/config.yml; a plain message is shown as-is with no caveat;/homes, the menu and/list-homesall send the notice withoutChatColor.RED, and/list-homessends exactly one line. Both guards inmessageNote()were broken and restored to confirm the tests catch them.