/signcopy throws when not using quotes
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 70/100
Research direction
Start in mechanics/signcopier/SignEditCommandsRegistration.java, especially extract$text at the stack-trace location, and reproduce the issue with /signcopy edit 1 first second. Check how the final parameter is parsed when it is unquoted. Done means unquoted line content no longer throws an exception and produces the expected result, or reports a proper error.
Written by the indexing model from the issue text.
Description
CraftBook Version
5.0.0-SNAPSHOT
Platform Version
26.1.2-60-main@b4682bf
Confirmations
- I am using the most recent Minecraft release.
- I am using a version of WorldEdit compatible with my Minecraft version.
- I am using a version of CraftBook compatible with my Minecraft version.
- I am using the latest or recommended version of my platform software.
- I am NOT using a hybrid server, e.g. a server that combines Bukkit and Forge. Examples include Arclight, Mohist, and Cardboard.
- I am NOT using a fork of WorldEdit, such as FastAsyncWorldEdit (FAWE) or AsyncWorldEdit (AWE)
Bug Description
Not enclosing the line-content parameter of the /signcopy-command throws an exception.
[07:50:03 ERROR]: [org.enginehub.craftbook.PlatformCommandManager] An unexpected error while handling a CraftBook command
java.lang.IllegalStateException: Too many values present
at com.google.common.base.Preconditions.checkState(Preconditions.java:513) ~[guava-33.5.0-jre.jar:?]
at worldedit-bukkit-8.0.0-SNAPSHOT-dist.jar//org.enginehub.piston.CommandValue.asSingle(CommandValue.java:109) ~[?:?]
at craftbook-bukkit-5.0.0-SNAPSHOT-dist.jar//org.enginehub.craftbook.mechanics.signcopier.SignEditCommandsRegistration.extract$text(SignEditCommandsRegistration.java:153) ~[?:?]
at craftbook-bukkit-5.0.0-SNAPSHOT-dist.jar//org.enginehub.craftbook.mechanics.signcopier.SignEditCommandsRegistration.cmd$edit(SignEditCommandsRegistration.java:119) ~[?:?]
at worldedit-bukkit-8.0.0-SNAPSHOT-dist.jar//org.enginehub.piston.CommandManager.execute(CommandManager.java:157) ~[?:?]
at craftbook-bukkit-5.0.0-SNAPSHOT-dist.jar//org.enginehub.craftbook.PlatformCommandManager.handleCommand(PlatformCommandManager.java:157) ~[?:?]
at craftbook-bukkit-5.0.0-SNAPSHOT-dist.jar//org.enginehub.craftbook.bukkit.CraftBookPlugin.onCommand(CraftBookPlugin.java:251) ~[?:?]
at worldedit-bukkit-8.0.0-SNAPSHOT-dist.jar//com.sk89q.bukkit.util.DynamicPluginCommand.execute(DynamicPluginCommand.java:55) ~[?:?]
at io.papermc.paper.command.brigadier.bukkit.BukkitCommandNode$BukkitBrigCommand.run(BukkitCommandNode.java:83) ~[paper-26.1.2.jar:26.1.2-60-b4682bf]
at com.mojang.brigadier.context.ContextChain.runExecutable(ContextChain.java:73) ~[brigadier-1.3.10.jar:?]
at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:30) ~[paper-26.1.2.jar:26.1.2-60-b4682bf]
at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:13) ~[paper-26.1.2.jar:26.1.2-60-b4682bf]
at net.minecraft.commands.execution.UnboundEntryAction.lambda$bind$0(UnboundEntryAction.java:8) ~[paper-26.1.2.jar:26.1.2-60-b4682bf]
at net.minecraft.commands.execution.CommandQueueEntry.execute(CommandQueueEntry.java:5) ~[paper-26.1.2.jar:26.1.2-60-b4682bf]
at net.minecraft.commands.execution.ExecutionContext.runCommandQueue(ExecutionContext.java:104) ~[paper-26.1.2.jar:26.1.2-60-b4682bf]
at net.minecraft.commands.Commands.executeCommandInContext(Commands.java:469) ~[paper-26.1.2.jar:26.1.2-60-b4682bf]
at net.minecraft.commands.Commands.performCommand(Commands.java:377) ~[paper-26.1.2.jar:26.1.2-60-b4682bf]
at net.minecraft.commands.Commands.performCommand(Commands.java:365) ~[paper-26.1.2.jar:26.1.2-60-b4682bf]
at net.minecraft.server.network.ServerGamePacketListenerImpl.performUnsignedChatCommand(ServerGamePacketListenerImpl.java:2426) ~[paper-26.1.2.jar:26.1.2-60-b4682bf]
at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChatCommand$0(ServerGamePacketListenerImpl.java:2399) ~[paper-26.1.2.jar:26.1.2-60-b4682bf]
at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-26.1.2.jar:26.1.2-60-b4682bf]
at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:205) ~[paper-26.1.2.jar:26.1.2-60-b4682bf]
at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[paper-26.1.2.jar:26.1.2-60-b4682bf]
at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1569) ~[paper-26.1.2.jar:26.1.2-60-b4682bf]
at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:194) ~[paper-26.1.2.jar:26.1.2-60-b4682bf]
at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:179) ~[paper-26.1.2.jar:26.1.2-60-b4682bf]
at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1549) ~[paper-26.1.2.jar:26.1.2-60-b4682bf]
at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1543) ~[paper-26.1.2.jar:26.1.2-60-b4682bf]
at net.minecraft.server.MinecraftServer.recordTaskExecutionTimeWhileWaiting(MinecraftServer.java:1273) ~[paper-26.1.2.jar:26.1.2-60-b4682bf]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1389) ~[paper-26.1.2.jar:26.1.2-60-b4682bf]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:304) ~[paper-26.1.2.jar:26.1.2-60-b4682bf]
at java.base/java.lang.Thread.run(Thread.java:1474) ~[?:?]
Expected Behavior
In the worst case, print a proper error - but to be frank, I'd rather have the plugin simply collect the arguments without requiring enclosing quotes, as it is obvious that that's what the player wants, based on the fact that it is the last parameter - no ambiguity there. In general, having to use said quotes is a big confusion to many of our players.
Reproduction Steps
- Copy a sign
- Run
/signcopy edit 1 first second
Anything Else?
No response
- Dominant language
- Java
- Stars
- 320
- Forks
- 165
- Avg merge
- 6d 21h
- Merged PRs (30d)
- 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from EngineHub/CraftBook
-
status:pending type:bug
Difficulty 3/5 1-2 days Newbie friendliness 58/100
-
status:pending type:bug
Difficulty 3/5 1-2 days Newbie friendliness 62/100
-
status:pending type:bug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
status:accepted type:feature-request
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Wireless Redstone Openstatus:pending type:feature-request
Difficulty 5/5 Over a week Newbie friendliness 25/100
All issues in EngineHub/CraftBook
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100