-
-
Notifications
You must be signed in to change notification settings - Fork 416
Pre Player Attack Entity #8329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev/feature
Are you sure you want to change the base?
Pre Player Attack Entity #8329
Conversation
|
Note that listening to cancelled events does not require the config, you can simply do |
Good to know. I can update the examples and description with that + whatever else is decided |
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
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good after sovde's changes
src/main/java/ch/njol/skript/conditions/CondWillBeAttacked.java
Outdated
Show resolved
Hide resolved
…tax for the event
|
Decided on on attempt[ing] to attack %entitydatas% |
…ack. add support for multiple entitiy datas
|
additionally you should change the target branch to dev/feature |
|
unsure how if at all, build failure is related to my code |
Co-authored-by: Efnilite <35348263+Efnilite@users.noreply.github.com>
the test run crashed, happens sometimes 😉 |
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>
Co-authored-by: Efnilite <35348263+Efnilite@users.noreply.github.com>
…into preplayerattack
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