Add EntityAttemptSmashAttackEvent#12113
Conversation
|
I think we'd benefit from potential passing the "result" as well? Also this is very much like, PlayerAttemptSmashAttackEvent (what a name). But just attack event might make it sound like this is the actual attack instead of just an event to control the check. |
|
PlayerAttemptSmashAttackEvent does describe the event better. What do you mean with "passing the "result" as well"? |
|
Well, it would be nice for plugins to know if the player can actually perform such an attack via the event. |
|
Oh I see, yeah that makes sense. I would still run the event always when the player attempts a smash attack and add a boolean field canSmashAttack, that tells if the player is allowed to perform a smash attack before any modifications, because the event can still be used to to something if there has been a successful smash attack. |
|
Yea kinda. You'd basically mark the event as "cancelled" by setting |
|
Hi, thanks for the changes. Right now tho, every attack is a smash attack because it is just passing the vanilla canSmash value to the event. |
|
My idea was that the information about the vanilla behviour persists, even when other plugins "uncancel" the event. |
|
Fair point, that sounds smart! |
9f94fdd to
8d14e25
Compare
|
After some more review, I did end up changing this back to result xD |
Allows controlling of smash attacks. Makes it possible to bypass vanilla requirements (high enough fall distance and not flying) or set your own.