-
-
Notifications
You must be signed in to change notification settings - Fork 75
Closed
Labels
bugSomething isn't workingSomething isn't workingcritical bugA bug that should be fixed ASAPA bug that should be fixed ASAPimplemented for next releaseThis has been implemented in the current dev build for the next public releaseThis has been implemented in the current dev build for the next public release
Description
CommandAPI version
8.5.0
Minecraft version
1.19
Are you shading the CommandAPI?
No
What I did
- Register the following command:
new CommandAPICommand("broken1") .withArguments(new StringArgument("key")) .withArguments(new IntegerArgument("a")) .withArguments(new StringArgument("key")) .executesPlayer((player, objects) -> { System.out.println(objects[0] + ", " + objects[1] + ", " + objects[2]); }) .register();
- Type
/broken1 str 123 str
What actually happened
Minecraft's client (the vanilla client, not the server) crashes and closes.
What should have happened
The command should be runnable
Server logs and CommandAPI config
No response
Other
This appears to be the case when there is a "gap" between arguments. The following (with two consecutive arguments with the same key) doesn't cause a crash:
new CommandAPICommand("broken")
.withArguments(new StringArgument("key"))
.withArguments(new StringArgument("key"))
.executesPlayer((player, objects) -> {
System.out.println(objects[0] + ", " + objects[1]);
})
.register();Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcritical bugA bug that should be fixed ASAPA bug that should be fixed ASAPimplemented for next releaseThis has been implemented in the current dev build for the next public releaseThis has been implemented in the current dev build for the next public release