PaperMC / PaperMC/Paper

Add Brigadier ArgumentType Support for Vanilla-style Operation Symbols (+=, *=, %=, etc)

Open
#12,540 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: accepted
Dominant language
Java
Stars
12.7k
Forks
3.5k
Avg merge
3d 13h
Merged PRs (30d)
11

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the ArgumentTypes entry point linked in the issue and review how existing Paper argument types integrate with Brigadier and client-side validation. Compare the desired operators with vanilla scoreboard players operation behavior; done means operators such as +=, -=, *=, /=, and %= are accepted, suggested correctly, and allow later arguments.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.