Description
Is your feature request related to a problem?
Yes. Currently, when creating custom Brigadier commands in Paper using StringArgumentType.word()
or StringArgumentType.string()
, it is not possible to enter vanilla-style operation symbols (e.g., +=
, *=
, %=
, etc.) without the argument turning red and being rejected as invalid by the client. This prevents the user from completing the command and adding arguments after it.
The only workaround is to use StringArgumentType.greedyString()
, but that restricts me from adding further arguments, which limits command flexibility and usability.
Describe the solution you'd like.
I would like Paper to add a native ArgumentType
that allows for the inclusion of vanilla-style operation symbols (+=
, -=
, *=
, /=
, %=
, etc.) in a way that works seamlessly with the client’s command validation—just like /scoreboard players operation
in vanilla Minecraft.
Ideally, this argument type would:
- Provide proper suggestions for valid operations
- Avoid being marked red/invalid in the command UI
- Support additional arguments after it (i.e., not consume the rest of the command like
greedyString()
does)
This could be implemented as a specialized argument under ArgumentTypes
, such as an enum-style argument for supported operators.
Describe alternatives you've considered.
StringArgumentType.word()
or.string()
→ These both cause symbols like+=
,*=
to appear red in-game and block further input.StringArgumentType.greedyString()
→ Accepts symbols but consumes the rest of the input, disallowing more arguments.- Custom argument types → Still show red in the client due to lack of proper integration with client-side syntax validation.
Other
This becomes a blocker when trying to replicate or mirror vanilla command syntax, such as with /scoreboard players operation
, where operations are a core part of the command flow.
Adding native support would make plugin commands much more expressive and compatible with existing Minecraft patterns.