Legoman99573 / GravesX

A fork of Graves by ranull. Source also forked from JSmethers.
https://www.spigotmc.org/resources/gravesx.118271/
GNU General Public License v3.0
3 stars 1 forks source link

[Bug] Unhandled exceptions in EntityDeathListener #33

Closed shantek closed 1 month ago

shantek commented 1 month ago

Minecraft Server Version

1.21-2256-de2e7a7 (MC: 1.21) Purpur

/graves dump output

Dumped: https://mclo.gs/JF6Mkq6

Summary of the bug

When running graves along side a plugin that modifies entity drops (for example a pug, dropping a head), the unhandled exceptions in EntityDeathListener prevent other plugins from handling the event and dropping the custom head. Removing the Graves plugin on my test server allows those plugins to process the event, adding GravesX back stops the event from being processed again.

Steps to Reproduce

Expected Result

All exceptions should be handled correctly and allow other plugins to handle the event.

Actual Result

Unhandled exceptions stop prevents any other plugin from processing the event, preventing any custom drops on the server.

Screenshots

No response

Additional Information

Issue: Casting EntityDeathEvent to PlayerDeathEvent without verifying if the event actually involves a player. Exception: If a non-player entity dies, casting the event to PlayerDeathEvent will throw a ClassCastException. Impact: This exception will disrupt the event handling flow, potentially affecting other plugins and causing unexpected behavior.

Version Confirmation

Legoman99573 commented 1 month ago

Switched to monitor. Should resolve that issue.

shantek commented 1 month ago

@Legoman99573 Just confirming if this has been included in any of the builds pushed out over the last week. Currently running the latest build and it's still causing issues.

Legoman99573 commented 1 month ago

Update purpur and let me know if the same issue occurs.