[SPIGOT-8016] Mace smash attack AoE does not fire knockback events Created: 09/Mar/25  Updated: 13/Mar/25  Resolved: 12/Mar/25

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Wertík Assignee: Doc
Resolution: Fixed Votes: 0
Labels: 1.21.4, mace
Environment:

Environment doesn't seem be relevant.


Version: CraftBukkit version 4446-Spigot-e5a64e7-e954502 (MC: 1.21.4) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
Guidelines Read: Yes

 Description   

When knockback is applied to a player as a result of the AoE (area of effect) of a smash attack with the mace weapon, no knockback event is fired. I assume the appropriate one would be `EntityKnockbackByEntityEvent`.

Not having this event fire means that protection plugins cannot ensure players not being pushed out of protective zones by others in cases where damaging other mobs is possible. It also makes denying pvp/knockback inconsistent.

To reproduce
Have a plugin listening to `EntityKnockbackEvent`.

public class KnockbackListener implements Listener {
    @EventHandler
    public void onKnockback(EntityKnockbackEvent e) {
        Bukkit.getLogger().info("Knockback on " + e.getEntityType());
    }
}

Hit a mob next to the player with a mace while falling from at least 1.5 blocks.

The listener only gets triggered for the mob that was directly hit.

 



 Comments   
Comment by Wertík [ 13/Mar/25 ]

All good now, thanks

Comment by md_5 [ 13/Mar/25 ]

That was a mistake, it should be corrected now

Comment by Wertík [ 13/Mar/25 ]

Adding a listener for EntityKnockbackByEntityEvent I get these logs while hitting a sheep next to another player with a smash attack:

[09:58:13] [Server thread/INFO]: Target: SHEEP Source: PLAYER
[09:58:13] [Server thread/INFO]: Target: PLAYER Source: SHEEP

where Target ~ #getEntity and Source ~ #getSourceEntity

I'm not sure having the sheep as the source of the knockback is ideal. This way we cannot find the actual origin of the knockback (the attacking player).

Comment by Doc [ 12/Mar/25 ]

PR Created: https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/pull-requests/1538/overview

 

Comment by Wertík [ 12/Mar/25 ]

Issue got resolved in Paper by this PR.

Comment by Wertík [ 09/Mar/25 ]

"Area of effect (often referred to as AoE) refers to mechanics that apply to an area of the ground rather than targeting a particular entity."

Comment by md_5 [ 09/Mar/25 ]

What is AOE?

Generated at Sat Dec 13 15:25:07 UTC 2025 using Jira 10.3.13#10030013-sha1:56dd970ae30ebfeda3a697d25be1f6388b68a422.