Skip to content

Keep creeper target as cause after the target dies - #2322

Merged
me4502 merged 3 commits into
EngineHub:version/7.0.xfrom
Almost10:fix/creeper-target-death
Nov 2, 2026
Merged

me4502 merged 3 commits into
EngineHub:version/7.0.xfrom
Almost10:fix/creeper-target-death

Conversation

@Almost10

Copy link
Copy Markdown
Contributor

Fixes #2284

If a creeper's explosion kills its target before blocks are broken, the creeper is used as the cause instead of the player, so non-members can blow up protected blocks. The creeper's player target is now tracked so it's still used as the cause after they die.

@me4502 me4502 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the PR! I've left a few comments as I'm not sure this is actually the best solution for the given issue.

Move the tracking to an ExplosionPrimeEvent handler in
WorldGuardEntityListener, as requested in review. The existing creeper
cleanup in onEntityExplode clears it.
@me4502
me4502 merged commit 5c0c7b4 into EngineHub:version/7.0.x Nov 2, 2026
2 checks passed
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.

Creeper bypasses WorldGuard block protection when a player dies from explosion

2 participants