mojira.dev
MC-222880

Brigadier Json Argument accepts an extra character

Hello,

I'm working on a plugin for the Sponge project and we discovered a client and server bug about the JSON (ComponentArgument.textArgument).

Indeed, this one accepts an extra character after the last bracket of the JSON, but it is not taken into account when the parser tries to read the JSON :

  • Scoreboard Objectives Add command: (see brigadierJSON1.png)

  • Scoreboard Objectives Modify Displayname command: (see brigadierJSON2.png)

  • Team Add command: (see brigadierJSON3.png)

This bug is not really annoying for the vanilla game because in fact, this JSON argument is always at the end of the command, so there is no other argument to parse.

However, plugins like mine on the SpongeAPI may use this argument in the middle of a command which can lead to client completion errors (see jsoncustom.png).

As this bug also affects the client, the Sponge team cannot totally manage to fix this by its own.

Thanks for reading this issue.

Linked issues

Attachments

Comments 1

Duplicate of MC-131636, though if this really is an issue with brigadier you may want to submit a PR here: https://github.com/Mojang/brigadier

Thibault HENRY

(Unassigned)

Unconfirmed

(Unassigned)

1.16.5

Retrieved