Skip to content
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

"any" conflict with cancellable events in input keys event #7481

Open
1 task done
rise2477 opened this issue Jan 20, 2025 · 4 comments
Open
1 task done

"any" conflict with cancellable events in input keys event #7481

rise2477 opened this issue Jan 20, 2025 · 4 comments
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. priority: medium Issues that are detrimental to user experience (prohibitive bugs or lack of useful implementation).

Comments

@rise2477
Copy link

Skript/Server Version

2.10.0/1.21.3

Bug Description

on any input key press:
send "You are pressing: %event-inputkeys%" to player

12:27:31 ERROR: Server thread dump (Look for plugins here before reporting to Paper!):
12:27:31 ERROR: ------------------------------
12:27:31 ERROR: Current Thread: Server thread
12:27:31 ERROR: PID: 54 | Suspended: false | Native: false | State: RUNNABLE
12:27:31 ERROR: Stack:
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.SkriptParser.parse_i(SkriptParser.java:1295)
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:196)
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:152)
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.SkriptParser.parseExpression(SkriptParser.java:309)
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.SkriptParser.parseSingleExpr(SkriptParser.java:520)
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.SkriptParser.parseExpression(SkriptParser.java:755)
12:27:31 ERROR: Skript.jar//ch.njol.skript.patterns.TypePatternElement.match(TypePatternElement.java:144)
12:27:31 ERROR: Skript.jar//ch.njol.skript.patterns.PatternElement.matchNext(PatternElement.java:36)
12:27:31 ERROR: Skript.jar//ch.njol.skript.patterns.OptionalPatternElement.match(OptionalPatternElement.java:28)
12:27:31 ERROR: Skript.jar//ch.njol.skript.patterns.PatternElement.matchNext(PatternElement.java:36)
12:27:31 ERROR: Skript.jar//ch.njol.skript.patterns.LiteralPatternElement.match(LiteralPatternElement.java:47)
12:27:31 ERROR: Skript.jar//ch.njol.skript.patterns.PatternElement.matchNext(PatternElement.java:36)
12:27:31 ERROR: Skript.jar//ch.njol.skript.patterns.OptionalPatternElement.match(OptionalPatternElement.java:28)
12:27:31 ERROR: Skript.jar//ch.njol.skript.patterns.PatternElement.matchNext(PatternElement.java:36)
12:27:31 ERROR: Skript.jar//ch.njol.skript.patterns.TypePatternElement.match(TypePatternElement.java:139)
12:27:31 ERROR: Skript.jar//ch.njol.skript.patterns.SkriptPattern.match(SkriptPattern.java:45)
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.SkriptParser.parse_i(SkriptParser.java:1295)
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:196)
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:152)
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.SkriptParser.parseExpression(SkriptParser.java:309)
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.SkriptParser.parseSingleExpr(SkriptParser.java:520)
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.SkriptParser.parseExpression(SkriptParser.java:755)
12:27:31 ERROR: Skript.jar//ch.njol.skript.patterns.TypePatternElement.match(TypePatternElement.java:144)
12:27:31 ERROR: Skript.jar//ch.njol.skript.patterns.SkriptPattern.match(SkriptPattern.java:45)
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.SkriptParser.parse_i(SkriptParser.java:1295)
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:196)
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:152)
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.SkriptParser.parseExpression(SkriptParser.java:309)
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.SkriptParser.parseSingleExpr(SkriptParser.java:520)
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.SkriptParser.parseExpression(SkriptParser.java:755)
12:27:31 ERROR: Skript.jar//ch.njol.skript.patterns.TypePatternElement.match(TypePatternElement.java:144)
12:27:31 ERROR: Skript.jar//ch.njol.skript.patterns.PatternElement.matchNext(PatternElement.java:36)
12:27:31 ERROR: Skript.jar//ch.njol.skript.patterns.LiteralPatternElement.match(LiteralPatternElement.java:47)
12:27:31 ERROR: Skript.jar//ch.njol.skript.patterns.PatternElement.matchNext(PatternElement.java:36)
12:27:31 ERROR: Skript.jar//ch.njol.skript.patterns.OptionalPatternElement.match(OptionalPatternElement.java:28)
12:27:31 ERROR: Skript.jar//ch.njol.skript.patterns.PatternElement.matchNext(PatternElement.java:36)
12:27:31 ERROR: Skript.jar//ch.njol.skript.patterns.LiteralPatternElement.match(LiteralPatternElement.java:47)
12:27:31 ERROR: Skript.jar//ch.njol.skript.patterns.ChoicePatternElement.match(ChoicePatternElement.java:45)
12:27:31 ERROR: Skript.jar//ch.njol.skript.patterns.GroupPatternElement.match(GroupPatternElement.java:29)
12:27:31 ERROR: Skript.jar//ch.njol.skript.patterns.OptionalPatternElement.match(OptionalPatternElement.java:25)
12:27:31 ERROR: Skript.jar//ch.njol.skript.patterns.SkriptPattern.match(SkriptPattern.java:45)
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.SkriptParser.parse_i(SkriptParser.java:1295)
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:196)
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:152)
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.SkriptParser.parseExpression(SkriptParser.java:309)
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.SkriptParser.parseSingleExpr(SkriptParser.java:520)
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.SkriptParser.parseExpression(SkriptParser.java:755)
12:27:31 ERROR: Skript.jar//ch.njol.skript.patterns.TypePatternElement.match(TypePatternElement.java:144)
12:27:31 ERROR: Skript.jar//ch.njol.skript.patterns.PatternElement.matchNext(PatternElement.java:36)
12:27:31 ERROR: Skript.jar//ch.njol.skript.patterns.LiteralPatternElement.match(LiteralPatternElement.java:47)
12:27:31 ERROR: Skript.jar//ch.njol.skript.patterns.SkriptPattern.match(SkriptPattern.java:45)
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.SkriptParser.parse_i(SkriptParser.java:1295)
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:196)
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:152)
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.Section.lambda$parse$0(Section.java:164)
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.Section$$Lambda/0x0000027db526b050.get(Unknown Source)
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.Section$SectionContext.modify(Section.java:200)
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.Section.parse(Section.java:163)
12:27:31 ERROR: Skript.jar//ch.njol.skript.ScriptLoader.loadItems(ScriptLoader.java:991)
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.Section.loadCode(Section.java:78)
12:27:31 ERROR: Skript.jar//ch.njol.skript.sections.SecConditional.init(SecConditional.java:219)
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.Section.init(Section.java:51)
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:241)
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:152)
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.Section.lambda$parse$0(Section.java:164)
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.Section$$Lambda/0x0000027db526b050.get(Unknown Source)
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.Section$SectionContext.modify(Section.java:200)
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.Section.parse(Section.java:163)
12:27:31 ERROR: Skript.jar//ch.njol.skript.ScriptLoader.loadItems(ScriptLoader.java:991)
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.Section.loadCode(Section.java:78)
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.Section.loadOptionalCode(Section.java:152)
12:27:31 ERROR: Skript.jar//ch.njol.skript.sections.SecLoop.init(SecLoop.java:121)
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.Section.init(Section.java:51)
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:241)
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:152)
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.Section.lambda$parse$0(Section.java:164)
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.Section$$Lambda/0x0000027db526b050.get(Unknown Source)
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.Section$SectionContext.modify(Section.java:200)
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.Section.parse(Section.java:163)
12:27:31 ERROR: Skript.jar//ch.njol.skript.ScriptLoader.loadItems(ScriptLoader.java:991)
12:27:31 ERROR: Skript.jar//ch.njol.skript.lang.SkriptEvent.load(SkriptEvent.java:129)
12:27:31 ERROR: Skript.jar//ch.njol.skript.structures.StructEvent.load(StructEvent.java:67)
12:27:31 ERROR: Skript.jar//ch.njol.skript.ScriptLoader.lambda$loadScripts$9(ScriptLoader.java:543)
12:27:31 ERROR: Skript.jar//ch.njol.skript.ScriptLoader$$Lambda/0x0000027db5268200.test(Unknown Source)
12:27:31 ERROR: [email protected]/java.util.ArrayList.removeIf(ArrayList.java:1755)
12:27:31 ERROR: [email protected]/java.util.ArrayList.removeIf(ArrayList.java:1743)
12:27:31 ERROR: Skript.jar//ch.njol.skript.ScriptLoader.lambda$loadScripts$14(ScriptLoader.java:534)
12:27:31 ERROR: Skript.jar//ch.njol.skript.ScriptLoader$$Lambda/0x0000027db5237d68.apply(Unknown Source)
12:27:31 ERROR: [email protected]/java.util.concurrent.CompletableFuture.uniApplyNow(CompletableFuture.java:684)
12:27:31 ERROR: [email protected]/java.util.concurrent.CompletableFuture.uniApplyStage(CompletableFuture.java:662)
12:27:31 ERROR: [email protected]/java.util.concurrent.CompletableFuture.thenApply(CompletableFuture.java:2200)
12:27:31 ERROR: Skript.jar//ch.njol.skript.ScriptLoader.loadScripts(ScriptLoader.java:486)
12:27:31 ERROR: Skript.jar//ch.njol.skript.ScriptLoader.loadScripts(ScriptLoader.java:428)
12:27:31 ERROR: Skript.jar//ch.njol.skript.SkriptCommand.onCommand(SkriptCommand.java:157)
12:27:31 ERROR: org.bukkit.command.PluginCommand.execute(PluginCommand.java:45)
12:27:31 ERROR: io.papermc.paper.command.brigadier.bukkit.BukkitCommandNode$BukkitBrigCommand.run(BukkitCommandNode.java:82)
12:27:31 ERROR: com.mojang.brigadier.context.ContextChain.runExecutable(ContextChain.java:73)
12:27:31 ERROR: net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:31)
12:27:31 ERROR: net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:19)
12:27:31 ERROR: net.minecraft.commands.execution.UnboundEntryAction.lambda$bind$0(UnboundEntryAction.java:8)
12:27:31 ERROR: net.minecraft.commands.execution.UnboundEntryAction$$Lambda/0x0000027db5480a78.execute(Unknown Source)
12:27:31 ERROR: net.minecraft.commands.execution.CommandQueueEntry.execute(CommandQueueEntry.java:5)
12:27:31 ERROR: net.minecraft.commands.execution.ExecutionContext.runCommandQueue(ExecutionContext.java:103)
12:27:31 ERROR: net.minecraft.commands.Commands.executeCommandInContext(Commands.java:448)
12:27:31 ERROR: net.minecraft.commands.Commands.performCommand(Commands.java:355)
12:27:31 ERROR: net.minecraft.commands.Commands.performCommand(Commands.java:342)
12:27:31 ERROR: net.minecraft.commands.Commands.performCommand(Commands.java:337)
12:27:31 ERROR: net.minecraft.server.network.ServerGamePacketListenerImpl.performUnsignedChatCommand(ServerGamePacketListenerImpl.java:2241)
12:27:31 ERROR: net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChatCommand$11(ServerGamePacketListenerImpl.java:2215)
12:27:31 ERROR: net.minecraft.server.network.ServerGamePacketListenerImpl$$Lambda/0x0000027db547ebc8.run(Unknown Source)
12:27:31 ERROR: net.minecraft.server.TickTask.run(TickTask.java:18)
12:27:31 ERROR: net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:154)
12:27:31 ERROR: net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24)
12:27:31 ERROR: net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1578)
12:27:31 ERROR: net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:207)
12:27:31 ERROR: net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:128)
12:27:31 ERROR: net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1555)
12:27:31 ERROR: net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1548)
12:27:31 ERROR: net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:138)
12:27:31 ERROR: net.minecraft.server.MinecraftServer.managedBlock(MinecraftServer.java:1499)
12:27:31 ERROR: net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1509)
12:27:31 ERROR: net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1345)
12:27:31 ERROR: net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:340)
12:27:31 ERROR: net.minecraft.server.MinecraftServer$$Lambda/0x0000027db3e113e8.run(Unknown Source)
12:27:31 ERROR: [email protected]/java.lang.Thread.runWith(Thread.java:1596)
12:27:31 ERROR: [email protected]/java.lang.Thread.run(Thread.java:1583)
12:27:31 ERROR: ------------------------------
12:27:31 ERROR: --- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH ---
12:27:31 ERROR: ------------------------------

Expected Behavior

Not sure

Steps to Reproduce

Just try to test new feature by copy from sk docs

Errors or Screenshots

No response

Other

No response

Agreement

  • I have read the guidelines above and affirm I am following them with this report.
@rise2477
Copy link
Author

Image

Here is screenshot

@erenkarakal erenkarakal added the cannot reproduce An issue that cannot be replicated. label Jan 20, 2025
@erenkarakal
Copy link
Member

you shouldn't be using any in the event since that's for cancellable events (player input event is not cancellable)
after fixing that issue it works fine. I didn't get any exceptions either way
the docs example needs to be fixed

@erenkarakal erenkarakal closed this as not planned Won't fix, can't repro, duplicate, stale Jan 20, 2025
@ShaneBeee
Copy link
Contributor

ShaneBeee commented Jan 20, 2025

Why was this closed? The pattern for the event is broken invalid!

you shouldn't be using any in the event since that's for cancellable events (player input event is not cancellable)

That is the pattern from the event. The event needs to be fixed.

Image

@Efnilite
Copy link
Member

the error is caused by a syntax supported in the event, so this is a bug

@Efnilite Efnilite reopened this Jan 20, 2025
@Efnilite Efnilite added bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. priority: medium Issues that are detrimental to user experience (prohibitive bugs or lack of useful implementation). and removed cannot reproduce An issue that cannot be replicated. labels Jan 20, 2025
@Efnilite Efnilite changed the title Input Key press Not working "any" conflict with cancellable events in input keys event Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. priority: medium Issues that are detrimental to user experience (prohibitive bugs or lack of useful implementation).
Projects
None yet
Development

No branches or pull requests

4 participants