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
Some armour stand syntax #6613
base: dev/feature
Are you sure you want to change the base?
Some armour stand syntax #6613
Conversation
- Allows checking of an armour stand's arms or base plate - Not set on the pattern. Should there be two instead of one with the [:no]? - I feel like the check method could be more efficient
- Allows checking of an armour stand's properties - The pattern seems fine, but should it be changed to have a second one which allows for `can` for ticking and moving? - Again, feel like the check method could be better
Just a note, the tick/move methods for ArmorStand are part of PaperAPI not Bukkit API, so you will have to do checks for that to prevent errors on Spigot |
Oh ty, I missed that when I was adding them. Thinking about moving them to their own separate class coz they feel kinda out of place in the Properties class imo ( |
- Split the properties and behaviour into their own syntax so the patterns weren't weird to accommodate for that - Changed LivingEntity to Entity to prevent ClassCastException being thrown (see issue SkriptLang#6612 and PR SkriptLang#6614)
- The result of splitting the properties syntax
- Split the properties and behaviours into their own syntax
- Just changed the patterns to be better
src/main/java/ch/njol/skript/conditions/CondArmorStandProperties.java
Outdated
Show resolved
Hide resolved
src/main/java/ch/njol/skript/conditions/CondArmorStandProperties.java
Outdated
Show resolved
Hide resolved
src/main/java/ch/njol/skript/effects/EffArmorStandBehaviour.java
Outdated
Show resolved
Hide resolved
src/main/java/ch/njol/skript/effects/EffArmorStandProperties.java
Outdated
Show resolved
Hide resolved
src/main/java/ch/njol/skript/effects/EffArmorStandProperties.java
Outdated
Show resolved
Hide resolved
Co-authored-by: sovdee <10354869+sovdeeth@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.
All that's left is tests!
src/main/java/ch/njol/skript/conditions/CondArmorStandExtremities.java
Outdated
Show resolved
Hide resolved
src/main/java/ch/njol/skript/conditions/CondArmorStandProperties.java
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.
just some formatting
A few edge case tests would also be good, eg put in a null variable, or a non-armor stand entity, etc.
You should also be using delete entity within {_e}
tbh
src/test/skript/tests/syntaxes/conditions/CondArmorStandBehaviour.sk
Outdated
Show resolved
Hide resolved
src/test/skript/tests/syntaxes/conditions/CondArmorStandExtremities.sk
Outdated
Show resolved
Hide resolved
src/test/skript/tests/syntaxes/conditions/CondArmorStandProperties.sk
Outdated
Show resolved
Hide resolved
Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
Added some edge case tests (the two that were mentioned). Let me know if there are any more I should worry about, or if the ones that were added are done wrong. |
Description
Adds some armour stand syntax. So far, this PR includes a couple of effects and conditions for extremities (arms, base plate), behaviour (canTick, canMove) and properties (size, marker). Would love any feedback.
Probably won't do in this PR:
Target Minecraft Versions: any (so far)
Requirements: none
Related Issues: #6597