Skip to content

Fire PrePlayerAttackEntityEvent for entities hit by sweep attacks - #14203

Open
TFSMads wants to merge 1 commit into
PaperMC:mainfrom
TFSMads:fix/sweep-preattack-evt
Open

Fire PrePlayerAttackEntityEvent for entities hit by sweep attacks#14203
TFSMads wants to merge 1 commit into
PaperMC:mainfrom
TFSMads:fix/sweep-preattack-evt

Conversation

@TFSMads

@TFSMads TFSMads commented Aug 21, 2026

Copy link
Copy Markdown

Currently, PrePlayerAttackEntityEvent is only fired for the entity that is directly attacked by a player. Entities subsequently hit by a sword sweep attack do not receive the event.

This PR adds PrePlayerAttackEntityEvent calls for entities affected by a sweep attack when the direct damage source is a player.

For each nearby entity affected by the sweep attack, the event is created with the attacking player and the entity being hit. If the event is cancelled, the entity is skipped and does not receive the sweep attack damage.

@Owen1212055

Copy link
Copy Markdown
Member

This is not a proper call for this event.

This event is meant to be called when attacking a specific player.

A separate event should be added.

As this would be then applicable to entities jabbed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Awaiting review

Development

Successfully merging this pull request may close these issues.

2 participants