-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Add Brigadier ArgumentType Support for Vanilla-style Operation Symbols (+=, *=, %=, etc) #12540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
You can't have native argument types without modifying the client |
I might have misread this, was pointed out that maybe you were asking for us to expose an argument type that already exists in the vanilla client? |
This looks like a literal and not like an argument type |
It is an argument type |
Indeed, it is its own dedicated argument. In Mojang code, it is referred to as the |
Is your feature request related to a problem?
Yes. Currently, when creating custom Brigadier commands in Paper using
StringArgumentType.word()
orStringArgumentType.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:
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.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.
The text was updated successfully, but these errors were encountered: