mojira.dev
MC-310135

The server crashes when requesting command suggestions for /attribute referenced from /execute

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:

  1. The crash occurs during the suggestion phase (listSuggestions), not during command execution.

  2. The exception message is: No such argument 'target' exists on this command.

  3. The stack trace shows the crash originates from AttributeCommand.lambda$register$11 → EntityArgument.getEntity() → CommandContext.getArgument("target").

  4. According to the Minecraft wiki, the command syntax is:

    /attribute <target> <attribute> modifier value get <id> [<scale>]
  5. The user triggers the crash by pressing Space after typing ... modifier value get—i.e., at the position where the <id> parameter is expected.

  6. The crash occurs when the command is nested inside /execute, but does not occur when the command is used directly.

  7. 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:

  1. Launch Minecraft 26.3 Snapshot 4 in singleplayer.

  2. Open the chat and begin typing:

    /execute as @s run attribute @s minecraft:armor modifier value get
  3. Press the Spacebar after typing get to request command suggestions for the <id> parameter.

  4. 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

Comments 0

No comments.

AnonAya09081227

gegy

Confirmed

Platform EC

Very Important

Commands

26.3 Snapshot 4

26.3 Snapshot 5

Retrieved