When the /attribute command is used inside an /execute context, triggering command suggestions at certain positions causes the integrated server to crash with an IllegalArgumentException.
Observed facts:
The crash occurs during the suggestion phase (
listSuggestions), not during command execution.The exception message is:
No such argument 'target' exists on this command.The stack trace shows the crash originates from
AttributeCommand.lambda$register$11→EntityArgument.getEntity()→CommandContext.getArgument("target").According to the Minecraft wiki, the command syntax is:
/attribute <target> <attribute> modifier value get <id> [<scale>]The user triggers the crash by pressing Space after typing
... modifier value get—i.e., at the position where the<id>parameter is expected.The crash occurs when the command is nested inside
/execute, but does not occur when the command is used directly.The crash does not occur when pressing Enter to execute the command (even if the command is incomplete and returns a syntax error).
Steps to Reproduce:
Launch Minecraft 26.3 Snapshot 4 in singleplayer.
Open the chat and begin typing:
/execute as @s run attribute @s minecraft:armor modifier value getPress the Spacebar after typing
getto request command suggestions for the<id>parameter.The integrated server crashes immediately with the following exception:
java.lang.IllegalArgumentException: No such argument 'target' exists on this command at net.minecraft.server.commands.AttributeCommand.lambda$register$11(AttributeCommand.java:116) at com.mojang.brigadier.tree.ArgumentCommandNode.listSuggestions(...)
Affects:
Minecraft 26.3 Snapshot 4.
Singleplayer integrated server.
Does not affect 26.3 Snapshot 3.
Linked issues
relates to 1
Comments 0
No comments.