Feature/damage abort event - #8822
Conversation
This comment has been minimized.
This comment has been minimized.
TheMug06
left a comment
There was a problem hiding this comment.
I agree with Owl on the patterns, they should reflect that this event is only for blocks. Also, block stop damage makes it moreso seem like a block is stopping damage/stopping dealing damage, instead of stopping being damaged.
|
Patterns and readability should be fixed |
| .addPatterns( | ||
| "[player] (stop|abort[ing]) (damag(e|ing)|break(ing)) [a] block", | ||
| "block damage abort", | ||
| "block damage being aborted" |
There was a problem hiding this comment.
I'm iffy about these patterns but I can't think of anything better
There was a problem hiding this comment.
This is the best I could think of :/
There was a problem hiding this comment.
Some other ideas, but i don't really have any great ones either
on block break interrupt[ion]
on interrupt[ion] of block break[ing]
on block breaking interrupt[ed]
on incomplete block break[ing]
on unfinished block break[ing]
I'm iffy about using the word damage here, since it kind of implies the block is damaging something. It's probably still good to have as an option in the pattern tho since users may already be familiar, but I don't think it should be the primary option
There was a problem hiding this comment.
I'd say it's atleast decent now, I decided to keep damage in since it's also in the oficial event name.
Co-authored-by: SirSmurfy2 <82696841+Absolutionism@users.noreply.github.com>
Co-authored-by: SirSmurfy2 <82696841+Absolutionism@users.noreply.github.com>
Co-authored-by: OwlBe <258166039+AnOwlBe@users.noreply.github.com>
Co-authored-by: OwlBe <258166039+AnOwlBe@users.noreply.github.com>
| .addPatterns( | ||
| "[player] (stop|abort[ing]) (damag(e|ing)|break(ing)) [a] block", | ||
| "block damage abort", | ||
| "block damage being aborted" |
There was a problem hiding this comment.
Some other ideas, but i don't really have any great ones either
on block break interrupt[ion]
on interrupt[ion] of block break[ing]
on block breaking interrupt[ed]
on incomplete block break[ing]
on unfinished block break[ing]
I'm iffy about using the word damage here, since it kind of implies the block is damaging something. It's probably still good to have as an option in the pattern tho since users may already be familiar, but I don't think it should be the primary option
… feature/damage-abort-event # Conflicts: # src/main/java/org/skriptlang/skript/bukkit/block/BlockModule.java
Problem
This PR aims to add the BlockDamageAbortEvent to skript to allow users to detect when a player stops breaking a block.
Solution
I added the event in the BlockModule.java class with the player and block as event values.
Testing Completed
It passed my manual testing and quickTests
Supporting Information
Completes: #8752
Related: none
AI assistance: none