Skip to content

Conversation

@PuppyTransGirl
Copy link
Owner

No description provided.

@PuppyTransGirl PuppyTransGirl added this to the 3.1.1 milestone Jan 19, 2026
@PuppyTransGirl PuppyTransGirl self-assigned this Jan 19, 2026
@PuppyTransGirl PuppyTransGirl added the enhancement Improvement to an existing feature label Jan 19, 2026
@coderabbitai
Copy link

coderabbitai bot commented Jan 19, 2026

📝 Walkthrough

Walkthrough

Adds multi-line (lore) support to Lang via four public getList overloads returning List<Component) and a private splitAndParseComponents helper. Updates loadSpecialTags iteration to use entrySet/getKey/getValue and adds @SuppressWarnings("PatternValidation") at class and method levels. Imports broadened to java.util.*. Example HomePlugin changes: dependency coordinate adjusted, niveriaApiVersion bumped, HomesMenu switched to Lang.getList for item lore, language YAML lore entries converted from indexed mappings to block scalars, and minor parentheses/formatting tweaks in several command classes.

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive No pull request description was provided by the author, making it impossible to assess relevance to the changeset. Please provide a description explaining the motivation and details of the lore support improvements to help reviewers understand the changes.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main change: adding four public getList() method overloads to the Lang class to improve multi-line message (lore) support.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Comment on lines +578 to +585
private static List<Component> splitAndParseComponents(@Nullable Audience audience, @NotNull String raw, @NotNull String key) {
if (raw.isEmpty())
return Collections.emptyList();

return Arrays.stream(raw.split("\\R", -1))
.map(line -> getComponentInternal(audience, line, key))
.toList();
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Return a mutable list (or document immutability).

Stream#toList() returns an unmodifiable list; callers may try to append lore lines and hit UnsupportedOperationException. Consider returning a mutable list or explicitly documenting immutability.

♻️ Proposed change
-        return Arrays.stream(raw.split("\\R", -1))
-                .map(line -> getComponentInternal(audience, line, key))
-                .toList();
+        return new ArrayList<>(
+                Arrays.stream(raw.split("\\R", -1))
+                        .map(line -> getComponentInternal(audience, line, key))
+                        .toList()
+        );
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
private static List<Component> splitAndParseComponents(@Nullable Audience audience, @NotNull String raw, @NotNull String key) {
if (raw.isEmpty())
return Collections.emptyList();
return Arrays.stream(raw.split("\\R", -1))
.map(line -> getComponentInternal(audience, line, key))
.toList();
}
private static List<Component> splitAndParseComponents(`@Nullable` Audience audience, `@NotNull` String raw, `@NotNull` String key) {
if (raw.isEmpty())
return Collections.emptyList();
return new ArrayList<>(
Arrays.stream(raw.split("\\R", -1))
.map(line -> getComponentInternal(audience, line, key))
.toList()
);
}

@PuppyTransGirl PuppyTransGirl merged commit 31e4e00 into master Jan 19, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improvement to an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants