-
-
Notifications
You must be signed in to change notification settings - Fork 20
GH-880 Fix player placeholder in home admin. #880
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe pull request modifies the Changes
Sequence DiagramsequenceDiagram
participant Admin
participant HomeAdminCommand
participant HomeManager
participant PluginConfiguration
participant NoticeService
Admin->>HomeAdminCommand: Execute admin home command
HomeAdminCommand->>PluginConfiguration: Retrieve configuration
HomeAdminCommand->>HomeManager: Fetch user homes
HomeManager-->>HomeAdminCommand: Return user homes
HomeAdminCommand->>HomeAdminCommand: Format homes with config separator
HomeAdminCommand->>NoticeService: Send formatted home list
NoticeService-->>Admin: Display home list
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
eternalcore-core/src/main/java/com/eternalcode/core/feature/home/homeadmin/HomeAdminCommand.java (1)
140-143: Consider adding null safety and documentation.While the configurable separator is a good improvement, consider these enhancements:
- Add null safety for the separator
- Add Javadoc explaining the format and configuration dependency
+ /** + * Formats the list of homes for the given user using the configured separator. + * + * @param uniqueId The UUID of the user + * @return A formatted string of home names + */ private String formattedListUserHomes(UUID uniqueId) { return this.homeManager.getHomes(uniqueId).stream() .map(home -> home.getName()) - .collect(Collectors.joining(this.pluginConfiguration.format.separator)); + .collect(Collectors.joining( + Optional.ofNullable(this.pluginConfiguration.format.separator) + .orElse(", ") + )); }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
eternalcore-core/src/main/java/com/eternalcode/core/feature/home/homeadmin/HomeAdminCommand.java(7 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: build (17)
🔇 Additional comments (2)
eternalcore-core/src/main/java/com/eternalcode/core/feature/home/homeadmin/HomeAdminCommand.java (2)
4-4: LGTM! Clean dependency injection implementation.The addition of
PluginConfigurationfollows good practices:
- Proper dependency injection
- Immutable field
- Clean constructor parameter ordering
Also applies to: 28-38
58-58: LGTM! Consistent placeholder implementation.The addition of player placeholders across all notifications improves context and user experience for admin operations.
Also applies to: 69-69, 89-89, 117-117, 135-135
CitralFlo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor change, merge it if tested
Summary by CodeRabbit
New Features
Refactor