Skip to content

Feature/damage abort event - #8822

Open
Pro2021CA wants to merge 14 commits into
SkriptLang:dev/featurefrom
Pro2021CA:feature/damage-abort-event
Open

Feature/damage abort event#8822
Pro2021CA wants to merge 14 commits into
SkriptLang:dev/featurefrom
Pro2021CA:feature/damage-abort-event

Conversation

@Pro2021CA

Copy link
Copy Markdown

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

@Pro2021CA
Pro2021CA requested review from a team and Absolutionism as code owners August 8, 2026 09:48
@Pro2021CA
Pro2021CA requested review from UnderscoreTud and cheeezburga and removed request for a team August 8, 2026 09:48
@skriptlang-automation skriptlang-automation Bot added needs reviews A PR that needs additional reviews needs triage An issue that hasn't been classified or verified yet labels Aug 8, 2026
@skriptlang-automation

This comment has been minimized.

@TheMug06
TheMug06 changed the base branch from master to dev/feature August 8, 2026 09:52
@skriptlang-automation skriptlang-automation Bot added the feature Pull request adding a new feature. label Aug 8, 2026
@skriptlang-automation skriptlang-automation Bot removed the needs triage An issue that hasn't been classified or verified yet label Aug 8, 2026
@skriptlang-automation skriptlang-automation Bot moved this to In Review in 2.17 Releases Aug 8, 2026
Comment thread src/main/java/org/skriptlang/skript/bukkit/block/BlockModule.java Outdated
Comment thread src/main/java/org/skriptlang/skript/bukkit/block/BlockModule.java Outdated
Comment thread src/main/java/org/skriptlang/skript/bukkit/block/BlockModule.java Outdated

@TheMug06 TheMug06 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

@Pro2021CA

Copy link
Copy Markdown
Author

Patterns and readability should be fixed

@Pro2021CA
Pro2021CA requested a review from TheMug06 August 8, 2026 10:21

@TheMug06 TheMug06 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

@Pro2021CA
Pro2021CA requested review from AnOwlBe and TheMug06 August 8, 2026 10:27
Comment thread src/main/java/org/skriptlang/skript/bukkit/block/BlockModule.java Outdated
Comment thread src/main/java/org/skriptlang/skript/bukkit/block/BlockModule.java Outdated
Comment thread src/main/java/org/skriptlang/skript/bukkit/block/BlockModule.java Outdated
Comment thread src/main/java/org/skriptlang/skript/bukkit/block/BlockModule.java Outdated
Comment thread src/main/java/org/skriptlang/skript/bukkit/block/BlockModule.java Outdated
Comment thread src/main/java/org/skriptlang/skript/bukkit/block/BlockModule.java Outdated
Comment thread src/main/java/org/skriptlang/skript/bukkit/block/BlockModule.java Outdated
@skriptlang-automation skriptlang-automation Bot removed the needs reviews A PR that needs additional reviews label Aug 8, 2026
.addPatterns(
"[player] (stop|abort[ing]) (damag(e|ing)|break(ing)) [a] block",
"block damage abort",
"block damage being aborted"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm iffy about these patterns but I can't think of anything better

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

This is the best I could think of :/

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.

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

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I'd say it's atleast decent now, I decided to keep damage in since it's also in the oficial event name.

@skriptlang-automation skriptlang-automation Bot added the needs reviews A PR that needs additional reviews label Aug 8, 2026
Pro2021CA and others added 2 commits August 8, 2026 14:50
Co-authored-by: SirSmurfy2 <82696841+Absolutionism@users.noreply.github.com>
Co-authored-by: SirSmurfy2 <82696841+Absolutionism@users.noreply.github.com>
Comment thread src/main/java/org/skriptlang/skript/bukkit/block/BlockModule.java Outdated
Comment thread src/main/java/org/skriptlang/skript/bukkit/block/BlockModule.java
Pro2021CA and others added 2 commits August 8, 2026 19:47
Co-authored-by: OwlBe <258166039+AnOwlBe@users.noreply.github.com>
Co-authored-by: OwlBe <258166039+AnOwlBe@users.noreply.github.com>
Comment thread src/main/java/org/skriptlang/skript/bukkit/block/BlockModule.java Outdated
.addPatterns(
"[player] (stop|abort[ing]) (damag(e|ing)|break(ing)) [a] block",
"block damage abort",
"block damage being aborted"

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.

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

Comment thread src/main/java/org/skriptlang/skript/bukkit/block/BlockModule.java Outdated
Comment thread src/main/java/org/skriptlang/skript/bukkit/block/BlockModule.java Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Pull request adding a new feature. needs reviews A PR that needs additional reviews

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

5 participants