Skip to content

GH-986 GH-1096 Moved sounds and enhanced death messages #1097

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

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

P1otrulla
Copy link
Member

@P1otrulla P1otrulla commented Aug 8, 2025

@P1otrulla P1otrulla requested a review from a team as a code owner August 8, 2025 16:59
@P1otrulla P1otrulla added the 🔧 enhancement Enhances existing function label Aug 8, 2025
Copy link

github-actions bot commented Aug 8, 2025

📦 Development Build Ready

Warning

Do not use this build in production. It is for testing purposes only and may be unstable.

👉 Click here to download the JAR

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

This pull request refactors the death message system to be more detailed and moves sound configuration into the translation files, which is a great improvement. The new death message logic is well-structured, handling various scenarios like PvP, projectile, and environmental deaths separately.

My review focuses on a few areas for improvement. I've identified some duplicated logic in DeathMessageController that could be refactored for better maintainability. More importantly, there are a couple of cases where the new death messages defined in the English translation file will not be triggered correctly due to issues in the controller logic, specifically for TNT and Wither Skull deaths. I've also noted some inconsistencies between the English and Polish translations that should be addressed. Overall, these are great enhancements, and with a few fixes, they will be perfect.

…athmessage/DeathMessageController.java

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@P1otrulla P1otrulla linked an issue Aug 8, 2025 that may be closed by this pull request
@vLuckyyy vLuckyyy removed request for igoyek and VerniQ August 8, 2025 19:34
Copy link
Member

@Jakubk15 Jakubk15 left a comment

Choose a reason for hiding this comment

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

While PlayerJoinSoundListener and PlayerQuitSoundListener were indeed moved to appropriate joinmessage/quitmessage packages that utilized Multification notices, the PlayerChatSoundListener was removed entirely, and—as far as I checked—there is no feature in EternalCore that replaced the removed controller. I'm hereby requesting re-adding that controller and moving it to the chat package.

…enhanced-death-messages

# Conflicts:
#	eternalcore-core/src/main/java/com/eternalcode/core/configuration/implementation/PluginConfiguration.java
…at/ChatSoundController.java

Co-authored-by: Jakub Kędziora <[email protected]>
@P1otrulla
Copy link
Member Author

/gemini review

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

This pull request refactors the sound configuration and significantly enhances the death message system. The changes are well-structured, moving configurations to more appropriate domain-specific classes and introducing detailed, scenario-based death messages. I've identified a couple of issues: a potential regression in the quit message handling for vanished players, and a misconfigured death message for TNT. Overall, this is a great improvement to the plugin's features and configuration.

EntityDamageEvent.DamageCause.FIRE_TICK, Collections.singletonList(
BukkitNotice.builder()
.sound(Sound.ITEM_FIRECHARGE_USE)
.chat("<white>☠ <dark_red>{PLAYER} <red>burned out in flames...")
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
.chat("<white>☠ <dark_red>{PLAYER} <red>burned out in flames...")
.chat("<white>☠ <dark_red>{PLAYER} <red>burned to ashes...")

"CACTUS", Arrays.asList(
BukkitNotice.builder()
.sound(Sound.BLOCK_GRASS_BREAK)
.chat("<white>☠ <dark_red>{PLAYER} <red>pricked themselves on a cactus!")
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
.chat("<white>☠ <dark_red>{PLAYER} <red>pricked themselves on a cactus!")
.chat("<white>☠ <dark_red>{PLAYER} <red>was pricked by a <dark_green>cactus!")

"# {KILLER} - Killer player",
"# {WEAPON} - Weapon used"
})
public Map<String, List<Notice>> deathMessageByWeapon = Map.of(
Copy link
Member

Choose a reason for hiding this comment

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

Add support to new minecraft weapon mace

"# {KILLER} - Zabójca",
"# {WEAPON} - Używana broń"
})
public Map<String, List<Notice>> deathMessageByWeapon = Map.of(
Copy link
Member

Choose a reason for hiding this comment

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

Add support to new minecraft weapon mace


if (this.vanishService.isVanished(player)) {

if (this.vanishService.isVanished(victim)) {
return;
}

Copy link
Member

Choose a reason for hiding this comment

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

Add option to not use custom death messages

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔧 enhancement Enhances existing function
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add enhanced death messages Remove the awesome sound section from config – move this to Multification
9 participants