Skript

Skript

743k Downloads

Plural issue

JakeGBLP opened this issue ยท 2 comments

commented

Skript/Server Version

[21:42:31 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[21:42:31 INFO]: [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[21:42:31 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[21:42:31 INFO]: [Skript] Server Version: 1.21-109-5a5035b (MC: 1.21)
[21:42:31 INFO]: [Skript] Skript Version: 2.9.1 (skriptlang-github)
[21:42:31 INFO]: [Skript] Installed Skript Addons:
[21:42:31 INFO]: [Skript]  - skript-reflect v2.5.1 (https://github.com/SkriptLang/skript-reflect)
[21:42:31 INFO]: [Skript]  - Lusk v1.3
[21:42:31 INFO]: [Skript]  - Bitshift v1.0
[21:42:31 INFO]: [Skript]  - SkBee v3.6.0 (https://github.com/ShaneBeee/SkBee)
[21:42:31 INFO]: [Skript] Installed dependencies: None

Bug Description

codename ending in "gui" becomes "guus"

Expected Behavior

should become guis

Steps to Reproduce

        Classes.registerClass(new ClassInfo<>(CLASS.class, "anythinggui")
                .user("anvil ?guis?")
                .name("Anvil Gui")
                .description("An anvil gui.") // add example
                .since("1.3")
                .parser(new Parser<>() {
                    @Override
                    public boolean canParse(final @NotNull ParseContext context) {
                        return false;
                    }

                    @Override
                    public @NotNull String toString(final AnvilGuiWrapper a, final int flags) {
                        return a.toString();
                    }

                    @Override
                    public @NotNull String toVariableNameString(final AnvilGuiWrapper a) {
                        return a.toString();
                    }

                    @Override
                    public @NotNull String getDebugMessage(final AnvilGuiWrapper a) {
                        return toString(a, 0) + " anvil gui (" + a + ")";
                    }
                }));

Errors or Screenshots

21:10:14 ERROR: #!#! [Skript] Severe Error:
21:10:14 ERROR: #!#! An error occurred while trying to load a Structure.
21:10:14 ERROR: #!#!
21:10:14 ERROR: #!#! Something went horribly wrong with Skript.
21:10:14 ERROR: #!#! This issue is NOT your fault! You probably can't fix it yourself, either.
21:10:14 ERROR: #!#! It looks like you are using some plugin(s) that alter how Skript works (addons).
21:10:14 ERROR: #!#! Here is full list of them:
21:10:14 ERROR: #!#! skript-reflect v2.5.1 (https://github.com/SkriptLang/skript-reflect) Lusk v1.3 SkBee v3.6.0 (https://github.com/ShaneBeee/SkBee) Bitshift v1.0
21:10:14 ERROR: #!#! We could not identify which of those are specially related, so this might also be Skript issue.
21:10:14 ERROR: #!#! You should try disabling those plugins one by one, trying to find which one causes it.
21:10:14 ERROR: #!#! If the error doesn't disappear even after disabling all listed plugins, it is probably Skript issue.
21:10:14 ERROR: #!#! In that case, you will be given instruction on how should you report it.
21:10:14 ERROR: #!#! On the other hand, if the error disappears when disabling some plugin, report it to author of that plugin.
21:10:14 ERROR: #!#! Only if the author tells you to do so, report it to Skript's issue tracker.
21:10:14 ERROR: #!#!
21:10:14 ERROR: #!#! Stack trace:
21:10:14 ERROR: #!#! java.lang.RuntimeException: pattern compiling exception, element class: it.jakegblp.lusk.elements.plugins.anvilgui.effects.EffAnvilGuiOpen (provided by Lusk)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:239)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:179)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.Statement.parse(Statement.java:65)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.ScriptLoader.loadItems(ScriptLoader.java:967)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.Section.loadCode(Section.java:93)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.Section.loadOptionalCode(Section.java:167)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.sections.SecLoop.init(SecLoop.java:124)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.Section.init(Section.java:67)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:259)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:179)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.Section.lambda$parse$0(Section.java:179)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.Section$SectionContext.modify(Section.java:212)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.Section.parse(Section.java:178)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.ScriptLoader.loadItems(ScriptLoader.java:987)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.ReturnHandler.lambda$loadReturnableTrigger$1(ReturnHandler.java:124)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.ReturnableTrigger.(ReturnableTrigger.java:36)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.ReturnHandler.loadReturnableTrigger(ReturnHandler.java:119)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.function.ScriptFunction.(ScriptFunction.java:54)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.function.Functions.loadFunction(Functions.java:124)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.structures.StructFunction.load(StructFunction.java:120)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.ScriptLoader.lambda$loadScripts$8(ScriptLoader.java:570)
21:10:14 ERROR: #!#! at java.base/java.util.ArrayList.removeIf(ArrayList.java:1756)
21:10:14 ERROR: #!#! at java.base/java.util.ArrayList.removeIf(ArrayList.java:1744)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.ScriptLoader.lambda$loadScripts$10(ScriptLoader.java:561)
21:10:14 ERROR: #!#! at java.base/java.util.concurrent.CompletableFuture.uniApplyNow(CompletableFuture.java:684)
21:10:14 ERROR: #!#! at java.base/java.util.concurrent.CompletableFuture.uniApplyStage(CompletableFuture.java:662)
21:10:14 ERROR: #!#! at java.base/java.util.concurrent.CompletableFuture.thenApply(CompletableFuture.java:2200)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.ScriptLoader.loadScripts(ScriptLoader.java:513)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.ScriptLoader.loadScripts(ScriptLoader.java:459)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.Skript$1.run(Skript.java:853)
21:10:14 ERROR: #!#! at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:86)
21:10:14 ERROR: #!#! at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:475)
21:10:14 ERROR: #!#! at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1225)
21:10:14 ERROR: #!#! at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:330)
21:10:14 ERROR: #!#! at java.base/java.lang.Thread.run(Thread.java:1570)
21:10:14 ERROR: #!#! Caused by: ch.njol.skript.patterns.MalformedPatternException: caught exception while compiling pattern [pattern: [lusk] open anvil[(-| )gui] %anvilgui% to %player%]
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.patterns.PatternCompiler.compile(PatternCompiler.java:56)
21:10:14 ERROR: #!#! at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1742)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.SkriptParser.parse_i(SkriptParser.java:1322)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:232)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:179)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.Statement.parse(Statement.java:65)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.ScriptLoader.loadItems(ScriptLoader.java:967)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.Section.loadCode(Section.java:93)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.Section.loadOptionalCode(Section.java:167)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.sections.SecLoop.init(SecLoop.java:124)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.Section.init(Section.java:67)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:259)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:179)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.Section.lambda$parse$0(Section.java:179)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.Section$SectionContext.modify(Section.java:212)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.Section.parse(Section.java:178)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.ScriptLoader.loadItems(ScriptLoader.java:987)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.ReturnHandler.lambda$loadReturnableTrigger$1(ReturnHandler.java:124)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.ReturnableTrigger.(ReturnableTrigger.java:36)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.ReturnHandler.loadReturnableTrigger(ReturnHandler.java:119)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.function.ScriptFunction.(ScriptFunction.java:54)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.function.Functions.loadFunction(Functions.java:124)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.structures.StructFunction.load(StructFunction.java:120)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.ScriptLoader.lambda$loadScripts$8(ScriptLoader.java:570)
21:10:14 ERROR: #!#! at java.base/java.util.ArrayList.removeIf(ArrayList.java:1756)
21:10:14 ERROR: #!#! at java.base/java.util.ArrayList.removeIf(ArrayList.java:1744)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.ScriptLoader.lambda$loadScripts$10(ScriptLoader.java:561)
21:10:14 ERROR: #!#! at java.base/java.util.concurrent.CompletableFuture.uniApplyNow(CompletableFuture.java:684)
21:10:14 ERROR: #!#! at java.base/java.util.concurrent.CompletableFuture.uniApplyStage(CompletableFuture.java:662)
21:10:14 ERROR: #!#! at java.base/java.util.concurrent.CompletableFuture.thenApply(CompletableFuture.java:2200)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.ScriptLoader.loadScripts(ScriptLoader.java:513)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.ScriptLoader.loadScripts(ScriptLoader.java:459)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.Skript$1.run(Skript.java:853)
21:10:14 ERROR: #!#! at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:86)
21:10:14 ERROR: #!#! at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:475)
21:10:14 ERROR: #!#! at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1225)
21:10:14 ERROR: #!#! at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:330)
21:10:14 ERROR: #!#! at java.base/java.lang.Thread.run(Thread.java:1570)
21:10:14 ERROR: #!#! Caused by: ch.njol.skript.SkriptAPIException: No class info found for anvilguus
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.registrations.Classes.getClassInfo(Classes.java:270)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.patterns.TypePatternElement.fromString(TypePatternElement.java:96)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.patterns.PatternCompiler.compile(PatternCompiler.java:140)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.patterns.PatternCompiler.compile(PatternCompiler.java:51)
21:10:14 ERROR: #!#! at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1742)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.SkriptParser.parse_i(SkriptParser.java:1322)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:232)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:179)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.Statement.parse(Statement.java:65)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.ScriptLoader.loadItems(ScriptLoader.java:967)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.Section.loadCode(Section.java:93)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.Section.loadOptionalCode(Section.java:167)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.sections.SecLoop.init(SecLoop.java:124)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.Section.init(Section.java:67)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:259)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:179)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.Section.lambda$parse$0(Section.java:179)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.Section$SectionContext.modify(Section.java:212)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.Section.parse(Section.java:178)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.ScriptLoader.loadItems(ScriptLoader.java:987)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.ReturnHandler.lambda$loadReturnableTrigger$1(ReturnHandler.java:124)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.ReturnableTrigger.(ReturnableTrigger.java:36)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.ReturnHandler.loadReturnableTrigger(ReturnHandler.java:119)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.function.ScriptFunction.(ScriptFunction.java:54)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.lang.function.Functions.loadFunction(Functions.java:124)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.structures.StructFunction.load(StructFunction.java:120)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.ScriptLoader.lambda$loadScripts$8(ScriptLoader.java:570)
21:10:14 ERROR: #!#! at java.base/java.util.ArrayList.removeIf(ArrayList.java:1756)
21:10:14 ERROR: #!#! at java.base/java.util.ArrayList.removeIf(ArrayList.java:1744)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.ScriptLoader.lambda$loadScripts$10(ScriptLoader.java:561)
21:10:14 ERROR: #!#! at java.base/java.util.concurrent.CompletableFuture.uniApplyNow(CompletableFuture.java:684)
21:10:14 ERROR: #!#! at java.base/java.util.concurrent.CompletableFuture.uniApplyStage(CompletableFuture.java:662)
21:10:14 ERROR: #!#! at java.base/java.util.concurrent.CompletableFuture.thenApply(CompletableFuture.java:2200)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.ScriptLoader.loadScripts(ScriptLoader.java:513)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.ScriptLoader.loadScripts(ScriptLoader.java:459)
21:10:14 ERROR: #!#! at Skript-2.9.1.jar//ch.njol.skript.Skript$1.run(Skript.java:853)
21:10:14 ERROR: #!#! at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:86)
21:10:14 ERROR: #!#! at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:475)
21:10:14 ERROR: #!#! at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1225)
21:10:14 ERROR: #!#! at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:330)
21:10:14 ERROR: #!#! at java.base/java.lang.Thread.run(Thread.java:1570)
21:10:14 ERROR: #!#!
21:10:14 ERROR: #!#! Version Information:
21:10:14 ERROR: #!#! Skript: 2.9.1 (latest)
21:10:14 ERROR: #!#! Flavor: skriptlang-github
21:10:14 ERROR: #!#! Date: 14:17:55.682181900
21:10:14 ERROR: #!#! Bukkit: 1.21-R0.1-SNAPSHOT
21:10:14 ERROR: #!#! Minecraft: 1.21
21:10:14 ERROR: #!#! Java: 22.0.1 (Java HotSpot(TM) 64-Bit Server VM 22.0.1+8-16)
21:10:14 ERROR: #!#! OS: Windows 11 amd64 10.0
21:10:14 ERROR: #!#!
21:10:14 ERROR: #!#! Server platform: Paper
21:10:14 ERROR: #!#!
21:10:14 ERROR: #!#! Current node: send "&e[STAFF] %{_player}'s prefix% &6%{_player}%: &7%loop-value%" to {_staff::*} (staffchat.sk, line 16)
21:10:14 ERROR: #!#! Current item: null
21:10:14 ERROR: #!#!
21:10:14 ERROR: #!#! Thread: Server thread
21:10:14 ERROR: #!#!
21:10:14 ERROR: #!#! Language: english
21:10:14 ERROR: #!#! Link parse mode: DISABLED
21:10:14 ERROR: #!#!
21:10:14 ERROR: #!#! End of Error.
21:10:14 ERROR: #!#!

Other

No response

Agreement

  • I have read the guidelines above and affirm I am following them with this report.
commented

Followed from Discord.

So our best guess is that it's working back from this plural in Utils
image

Now the plural system is kind of wonky and probably could do with improvements (2.10?) but since this is a pretty rare case, for the time being I'd like to get a simple workaround in the next patch by converting the big array to a stack of paired singular/plurals so that addons can insert their own.

commented

Duplicate of #5879, not sure which we'd prefer