-
-
Notifications
You must be signed in to change notification settings - Fork 368
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
Adds CondHasLineOfSight #5562
Adds CondHasLineOfSight #5562
Conversation
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.
Nice PR ⚡
src/main/java/ch/njol/skript/conditions/CondHasLineOfSight.java
Outdated
Show resolved
Hide resolved
src/main/java/ch/njol/skript/conditions/CondHasLineOfSight.java
Outdated
Show resolved
Hide resolved
src/test/skript/tests/syntaxes/conditions/CondHasLineOfSight.sk
Outdated
Show resolved
Hide resolved
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.
This can be a PropertyCondition
I considered that, but no other PropertyCondition I looked at had a second expression. Since I'd have to override the init anyway, as well as not use the PC register method (because of "has no line of sight"), I thought it'd be better to just use a normal condition. |
Yes, I don't think it needs |
Doesn't that allow |
I'm also not sure how I'd go about getting all the target without access to the event in PropertyCondition#check(T t). |
I don't think this should be a PropertyCondition, as that aims at one expression not two |
src/main/java/ch/njol/skript/conditions/CondHasLineOfSight.java
Outdated
Show resolved
Hide resolved
Co-authored-by: LimeGlass <16087552+TheLimeGlass@users.noreply.github.com>
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.
Little nitpick I had
src/main/java/ch/njol/skript/conditions/CondHasLineOfSight.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Fusezion <fusezionstream@gmail.com>
Description
Adds CondHasLineOfSight. Checks if one or more living entities have unobstructed lines of sight to the target entities/locations.
Target Minecraft Versions:
Requirements:
Related Issues: #4185