Pre Player Attack Entity#8329
Merged
APickledWalrus merged 39 commits intoSkriptLang:dev/featurefrom Mar 31, 2026
Merged
Conversation
Member
|
Note that listening to cancelled events does not require the config, you can simply do |
Contributor
Author
Good to know. I can update the examples and description with that + whatever else is decided |
sovdeeth
requested changes
Dec 24, 2025
src/main/java/ch/njol/skript/conditions/CondWillBeAttacked.java
Outdated
Show resolved
Hide resolved
src/main/java/ch/njol/skript/conditions/CondWillBeAttacked.java
Outdated
Show resolved
Hide resolved
src/main/java/ch/njol/skript/conditions/CondWillBeAttacked.java
Outdated
Show resolved
Hide resolved
src/main/java/ch/njol/skript/conditions/CondWillBeAttacked.java
Outdated
Show resolved
Hide resolved
src/main/java/ch/njol/skript/classes/data/BukkitEventValues.java
Outdated
Show resolved
Hide resolved
Efnilite
requested changes
Dec 25, 2025
Member
Efnilite
left a comment
There was a problem hiding this comment.
looks good after sovde's changes
src/main/java/ch/njol/skript/conditions/CondWillBeAttacked.java
Outdated
Show resolved
Hide resolved
…tax for the event
Contributor
Author
|
Decided on on attempt[ing] to attack %entitydatas% |
…ack. add support for multiple entitiy datas
Co-authored-by: Efnilite <35348263+Efnilite@users.noreply.github.com>
Co-authored-by: Efnilite <35348263+Efnilite@users.noreply.github.com>
Co-authored-by: Efnilite <35348263+Efnilite@users.noreply.github.com>
Co-authored-by: Efnilite <35348263+Efnilite@users.noreply.github.com>
Co-authored-by: Efnilite <35348263+Efnilite@users.noreply.github.com>
…into preplayerattack
APickledWalrus
approved these changes
Mar 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
This event could be useful in some situations.
https://jd.papermc.io/paper/1.21.11/io/papermc/paper/event/player/PrePlayerAttackEntityEvent.html
Solution
Added
on attempt attackandon attempt[ing] to attack %entitydatas%Addeddecided not to include since it's effectively useless. the event is fired as canceled if the entity won't be attacked[the] (entity|victim) (:will|will not|won't) be attack(ed|ing)Testing Completed
Tested my examples given. Everything works as expected
Supporting Information
ExprAttacked and ExprAttacker also updated to support this event, and I also updated the code in both classes to follow new conventions
Completes: 8266
Related: none
AI assistance: none