-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add accepts change condition #94
base: 2.x
Are you sure you want to change the base?
Conversation
let me know if I'm over simplifying this but couldn't we just add
might be better to suffix modes with since expressions and likely classinfos have |
getAcceptedChangeModes is intended for documentation purposes, not real logic |
…eature/change-condition
@@ -214,6 +215,31 @@ public String getVariableNamePattern() { | |||
Classes.registerClass(new ClassInfo<>(Section.class, "section") | |||
.user("sections?") | |||
); | |||
|
|||
Classes.registerClass(new ClassInfo<>(Expression.class, "expression") |
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.
skript-reflect actually already returns unwrapped Expression objects, but there hasn't been a registered classinfo for it
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.
Only optional changes! nice work
{"%classinfo% can be added to %expressions%", ChangeMode.ADD}, | ||
{"%classinfo% (can't|cannot) be added to %expressions%", ChangeMode.ADD}, |
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.
{"%classinfo% can be added to %expressions%", ChangeMode.ADD}, | |
{"%classinfo% (can't|cannot) be added to %expressions%", ChangeMode.ADD}, | |
{"%classinfo% can be (added|given) to %expressions%", ChangeMode.ADD}, | |
{"%classinfo% (can't|cannot) be (added|given) to %expressions%", ChangeMode.ADD}, |
Not sure if it's worth doing this, but if you agree, the other modes should be done as well, like clear
for DELETE
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.
sounds like a good idea. i can't recall if skript has a dirt can be given to player
type syntax though. i'll have to double check so we dont accidentally cause a conflict if there is
Aims to add an easy to to see if an expression accepts a changemode