-
-
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
Add a way to get patterns from the PropertyCondition #7107
base: dev/feature
Are you sure you want to change the base?
Add a way to get patterns from the PropertyCondition #7107
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.
looks good otherwise
/** | ||
* Indicates that the condition is in a form of <code>something is/are something</code>, | ||
* also possibly in the negated form | ||
*/ | ||
IS, | ||
|
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 is just BE, why does it need to be added
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.
BE doesn't equal is/are. There is no reference to BE anywhere. Nico realized this after the PR.
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.
well is/are are conjugated forms of "to be", so BE makes sense
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.
Is this blocking to not have both enums?
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.
Yeah, either rename BE or keep BE (i prefer keeping)
It's just confusing to have two types that do and mean the exact same thing
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.
renaming would be a breaking change!
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.
Not renaming, it's adding the proper terminology.
* @param type must be plural, for example <i>players</i> in <i>players can fly</i> | ||
* @return patterns formmated for {@link Skript#registerCondition(Class, String...)} | ||
*/ | ||
public static String[] getPatterns(PropertyType propertyType, String property, String type) { |
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.
i'd prefer this be private. if someone wants to get the patterns they could use the syntaxelementinfo
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.
I'd like it to be public so other syntaxes can use the property patterns without being property conditions, and without duplicating code.
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.
Description
Adds a way to get the property condition patterns, since I see many people making patterns similar to PropertyCondition but can't use the PropertyCondition register method due to the pattern.
This allows developers to collect and use the patterns in the way they want.
Target Minecraft Versions: any
Requirements: none
Related Issues: none