Closed DereWah closed 1 week ago
Caused by it being interpreted as a plural, see https://github.com/SkriptLang/Skript/blob/7632dd8fb367778bf9f28b59e4f147f091d37302/src/main/java/ch/njol/skript/util/Utils.java#L261
Ohh, yeah I see. Maybe some filtering for certain words? Or also check that the word "i" is alone and not in the end of another word.
You're most likely not using a .lang file that defines the allowed plurals and genders. You need to tell Skript to allow virtualgui¦s @an
the an
can also be a
or omitted entirely if you don't want a
support. See the following for an example; https://github.com/SkriptLang/Skript/blob/7632dd8fb367778bf9f28b59e4f147f091d37302/src/main/resources/lang/default.lang#L1952-L2033
You also set the user allowed input using the user
method in a classinfo https://docs.skriptlang.org/javadocs/ch/njol/skript/classes/ClassInfo.html#user(java.lang.String...)
Any updates?
Any updates?
Nope. I initally opened this issue because in my addon I was trying to call my TypeInfo "AnvilGui". I ended up just calling it "anvil".
The issue came back when I was trying to update compatibility for 1.20.1, as the type info name "anvil" got taken by Skript I think(?) Or anyways was no longer available.
In the end I just called it "virtualanvil".
Adding a lang file didn't solve btw
I came across a similar issue when trying to pluralize "objective" -> "objectives" in my addon, getting a similar error:
Caused by: ch.njol.skript.SkriptAPIException: No class info found for objectife
I have a lang file all setup correctly, and still a no go.
I came across a similar issue when trying to pluralize "objective" -> "objectives" in my addon, getting a similar error:
Caused by: ch.njol.skript.SkriptAPIException: No class info found for objectife
I have a lang file all setup correctly, and still a no go.
Error says objectife
with an F. Did you mistype objective
? Send code.
Skript uses this method to get ClassInfo singular classinfo names when parsing type pattern elements. Frankly, this method is flawed and we should find ways to improve it OR just consider types in patterns plural when s
is used at the end (may have its own implications!)
https://github.com/SkriptLang/Skript/blob/0bfec0b709cf74bace063d315d0eb501058cac14/src/main/java/ch/njol/skript/util/Utils.java#L283
Skript/Server Version
Bug Description
Hello, I am working on updating my Addon Skript-AnvilGUI.
Whenever I try to rename the type codename to "anvilgui" or "virtualanvilgui", it prints an error in the console, and refers to the type as "virtualanvilguu"
Expected Behavior
It should find the class "virtualanvilgui"
Steps to Reproduce
Add the word "anvilgui" or "gui" to any classinfo in your addon.
Errors or Screenshots
Other
No response
Agreement