Skip to content

GH-253 Add configurable placeholder settings and new placeholders - #253

Merged
P1otrulla merged 12 commits into
masterfrom
add-more-placeholders
Oct 13, 2025
Merged

GH-253 Add configurable placeholder settings and new placeholders#253
P1otrulla merged 12 commits into
masterfrom
add-more-placeholders

Conversation

@P1otrulla

@P1otrulla P1otrulla commented Aug 11, 2025

Copy link
Copy Markdown
Member

Introduces PlaceholderSettings to allow customization of placeholder output, specifically for isInCombat_formatted. Adds new placeholders isInCombat and isInCombat_formatted to FightTagPlaceholder, updates BridgeService and PluginConfig to support the new settings, and adjusts command permission annotation placement. Also updates build scripts and dependencies.

Please describe the changes made by this PR and why they need to be merged:

Introduces PlaceholderSettings to allow customization of placeholder output, specifically for isInCombat_formatted. Adds new placeholders isInCombat and isInCombat_formatted to FightTagPlaceholder, updates BridgeService and PluginConfig to support the new settings, and adjusts command permission annotation placement. Also updates build scripts and dependencies.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Summary of Changes

Hello @P1otrulla, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces significant enhancements to the plugin's placeholder system, allowing for greater customization and flexibility. It adds new placeholders to display combat status and makes their output configurable through dedicated settings. Additionally, it refines command permission handling and updates build configurations to align with recent changes.

Highlights

  • Configurable Placeholder Settings: Introduced a new PlaceholderSettings class that allows for the customization of strings returned by certain placeholders, specifically isInCombat_formatted.
  • New Combat Status Placeholders: Added two new placeholders: isInCombat, which returns a boolean string ("true" or "false") indicating combat status, and isInCombat_formatted, which returns user-defined strings based on the combat state.
  • Configuration Integration for Placeholders: Updated the BridgeService to pass the new PlaceholderSettings to the FightTagPlaceholder and integrated these settings into the PluginConfig to enable user configuration.
  • Refined Command Permissions: The @Permission annotation for the EternalCombatReloadCommand was moved from the class level to the specific execute method, providing more precise permission control for the reload command.
  • Build Script Updates: The project version was updated to 2.2.1-SNAPSHOT, and the Minecraft version for the runServer task was adjusted from 1.21.4 to 1.21 in the build scripts.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces configurable placeholders for combat status, which is a great addition for server owners to customize their messages. The changes are well-structured, touching upon configuration, placeholder logic, and services. The refactoring of the command permission annotation from class-level to method-level is a good improvement for granularity. I have a couple of suggestions to improve the code further, mainly regarding an unused import and optimizing the new placeholder logic for better performance and maintainability.

Comment thread eternalcombat-plugin/src/main/java/com/eternalcode/combat/CombatPlugin.java Outdated
@CitralFlo

Copy link
Copy Markdown
Member
new.placeholder.mp4

@CitralFlo
CitralFlo removed their request for review August 11, 2025 19:54
@P1otrulla
P1otrulla requested a review from Rollczi August 11, 2025 20:09
@P1otrulla P1otrulla changed the title Add configurable placeholder settings and new placeholders GH-253 Add configurable placeholder settings and new placeholders Aug 11, 2025
Comment thread buildSrc/src/main/kotlin/eternalcombat-java.gradle.kts Outdated
@P1otrulla
P1otrulla requested a review from Rollczi August 22, 2025 15:30
@P1otrulla

Copy link
Copy Markdown
Member Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces configurable settings for placeholders and adds new placeholders, which is a great enhancement. The refactoring of FightTagPlaceholder to use a switch expression improves readability, and the permission fix for the reload command is an important correction. I've provided a couple of suggestions to further improve the placeholder implementation: one to align with PlaceholderAPI's standard behavior for unknown placeholders, and another to simplify one of the helper methods for better conciseness.

@P1otrulla

Copy link
Copy Markdown
Member Author

Fully tested it's working

Comment thread eternalcombat-plugin/build.gradle.kts Outdated
…ge/placeholder/FightTagPlaceholder.java

Co-authored-by: Jakub Kędziora <77227023+Jakubk15@users.noreply.github.com>
@vLuckyyy
vLuckyyy removed the request for review from mydelkonivea October 8, 2025 21:25
- Simplified conversion to string in handleIsInCombat.
- Adjusted build script to use Modrinth URLs for plugin downloads and rolled back Minecraft version to 1.21.
@P1otrulla
P1otrulla merged commit a0bd849 into master Oct 13, 2025
1 check passed
@P1otrulla
P1otrulla deleted the add-more-placeholders branch October 13, 2025 00:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants