-
-
Notifications
You must be signed in to change notification settings - Fork 382
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
SimplePropertyExpression fromType argument throws unparsed literal if not lower case #5452
Comments
The code formatting is weird, i hope that's readable |
I'm not sure if case actually matters. The issue here is likely that you are using Object without explicitlyhandling UnparsedLiterals. To do this, you can call LiteralUtils#defendExpression for each |
Does skript have a class where this happens? I think I happen to need to do this in a few of my classes |
Should be addressed for SimplePropertyExpressions though. They should be needing to override the init method to handle the defending. This is a fundamentally known issue. Njol would always use the getConverteredExpression to the Object.class which is essentially what the defend expression LiteralUtils methods do, but also account for expression lists. This is something that should not be needing to be done. At the minimum it shouldn't be needed in SimplePropertyExpression. |
Do I close the issue? |
No |
Skript/Server Version
Bug Description
When registering a simple property expression, if the fromType argument of the register method is not lowercase (ie: object -> Object, block -> Block), it will throw an unparsed literal exception or whatever that is,
Expected Behavior
Skript should make it lowercase and also send a console message or something saying that it's a better practice to have it lower case to begin with.
Steps to Reproduce
The text was updated successfully, but these errors were encountered: