Skip to content

GH-348 Post death command execution#348

Open
Jakubk15 wants to merge 15 commits intomasterfrom
feature/post-death-commands
Open

GH-348 Post death command execution#348
Jakubk15 wants to merge 15 commits intomasterfrom
feature/post-death-commands

Conversation

@Jakubk15
Copy link
Member

@Jakubk15 Jakubk15 added the 🆕 feature New feature or request label Feb 20, 2026
@Jakubk15 Jakubk15 changed the title Post death command execution GH-348 Post death command execution Feb 20, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @Jakubk15, 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 a significant new feature enabling server administrators to configure custom commands that execute automatically upon a player's death. This enhancement provides granular control over post-death events, allowing for different commands to be run by the console, the deceased player, or their killer, with options for deferred execution and combat-tagging conditions.

Highlights

  • Post-Death Command Execution: Implemented a new feature allowing configurable commands to be executed after a player's death, offering extensive customization for server administrators.
  • Configurable Command Sources: Introduced settings to define commands that can be run by the console, the dead player, or the killer, providing flexibility in how post-death events are handled.
  • Deferred Command Execution: Added options to defer the execution of certain commands until the player respawns, enabling more dynamic post-death scenarios.
  • Combat Tagging Condition: Included a setting to restrict post-death command execution only to combat-tagged players, ensuring commands are only triggered in relevant combat situations.
  • Build System Updates: Updated build configurations to include a new dependency, EternalCore, and updated the target Minecraft version.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • buildSrc/src/main/kotlin/Versions.kt
    • Added the ETERNALCORE version constant.
  • eternalcombat-plugin/build.gradle.kts
    • Reordered import statements for better organization.
    • Updated the target Minecraft version from 1.21.10 to 1.21.11.
    • Configured the runServer task to download EternalCore as a modrinth plugin.
  • eternalcombat-plugin/src/main/java/com/eternalcode/combat/CombatPlugin.java
    • Reordered import statements for consistency.
    • Moved the java.time.Duration import to a more appropriate section.
    • Registered the new DeathCommandController to handle post-death command logic.
  • eternalcombat-plugin/src/main/java/com/eternalcode/combat/config/implementation/CommandSettings.java
    • Added consolePostDeathCommands to specify commands executed by the console after death.
    • Introduced deferConsoleAfterRespawn to control when console commands are executed.
    • Added deadPostDeathCommands for commands executed by the dead player.
    • Included deferDeadAfterRespawn to control when dead player commands are executed.
    • Added killerPostDeathCommands for commands executed by the killer.
    • Introduced onlyExecuteIfTagged to restrict command execution to tagged combat scenarios.
  • eternalcombat-plugin/src/main/java/com/eternalcode/combat/config/implementation/PluginConfig.java
    • Updated comments for the commands section to reflect the new post-death and logout command execution features.
  • eternalcombat-plugin/src/main/java/com/eternalcode/combat/fight/death/DeathCommandController.java
    • Added a new class DeathCommandController responsible for listening to player death and respawn events.
    • Implemented logic to execute configured post-death commands based on various conditions (console, dead player, killer).
    • Included functionality for deferring command execution until respawn and handling combat tag requirements.
    • Provided placeholder replacement for player and killer names in commands.
Activity
  • No human activity (comments, reviews, etc.) has been recorded for this pull request yet.
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 by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

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 pull request 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.

Copy link
Contributor

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

Choose a reason for hiding this comment

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

Code Review

The pull request introduces post-death command execution, a feature suggested by the community. This includes adding new configuration options for console, dead player, and killer commands, along with logic to defer command execution until respawn. The changes also update dependency versions and import statements. Overall, the implementation seems to address the requested feature effectively, but there are a few areas for improvement regarding code clarity and placeholder consistency.

Comment on lines +60 to +62
if (this.config.commands.onlyExecuteIfTagged) {
return;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The onlyExecuteIfTagged check is performed here, but it's only for PlayerDeathEvent. If onPlayerUntag is also meant to respect this setting, the check should be moved to executeDeathCommands or duplicated in onPlayerUntag to ensure consistent behavior.

Copy link
Member Author

Choose a reason for hiding this comment

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

I tested it and I wasn't able to produce any bugs, however I encourage other team members to try it nevertheless

Jakubk15 and others added 4 commits February 20, 2026 10:57
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Jakubk15 and others added 8 commits March 15, 2026 17:57
…t/death/DeathCommandController.java

Co-authored-by: DMK <81445555+imDMK@users.noreply.github.com>
…t/death/DeathCommandController.java

Co-authored-by: DMK <81445555+imDMK@users.noreply.github.com>
…o feature/post-death-commands

# Conflicts:
#	eternalcombat-plugin/src/main/java/com/eternalcode/combat/fight/death/DeathCommandController.java
@Jakubk15 Jakubk15 requested review from CitralFlo and imDMK March 22, 2026 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🆕 feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants