Expose certain scoreboard related argument types#12541
Open
Strokkur424 wants to merge 24 commits intoPaperMC:mainfrom
Open
Expose certain scoreboard related argument types#12541Strokkur424 wants to merge 24 commits intoPaperMC:mainfrom
Strokkur424 wants to merge 24 commits intoPaperMC:mainfrom
Conversation
lynxplay
requested changes
May 11, 2025
Contributor
lynxplay
left a comment
There was a problem hiding this comment.
In general, I'll poke some other team members about this, so I'd wait a bit with implementing my feedback given how drastic it is.
paper-api/src/main/java/io/papermc/paper/InternalAPIBridge.java
Outdated
Show resolved
Hide resolved
paper-api/src/main/java/io/papermc/paper/InternalAPIBridge.java
Outdated
Show resolved
Hide resolved
paper-api/src/main/java/io/papermc/paper/InternalAPIBridge.java
Outdated
Show resolved
Hide resolved
paper-api/src/main/java/io/papermc/paper/command/brigadier/argument/ArgumentTypes.java
Outdated
Show resolved
Hide resolved
paper-api/src/main/java/io/papermc/paper/command/brigadier/argument/ArgumentTypes.java
Outdated
Show resolved
Hide resolved
paper-server/src/main/java/io/papermc/paper/command/brigadier/ApiMirrorRootNode.java
Outdated
Show resolved
Hide resolved
paper-api/src/main/java/io/papermc/paper/command/brigadier/argument/operation/Operation.java
Outdated
Show resolved
Hide resolved
...erver/src/main/java/io/papermc/paper/command/brigadier/argument/operation/OperationImpl.java
Outdated
Show resolved
Hide resolved
paper-server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreHolder.java
Outdated
Show resolved
Hide resolved
0b2ca4b to
4e0ae70
Compare
48706b4 to
c675e17
Compare
5e0e732 to
5dbc0bf
Compare
Member
Author
|
Rebased to 1.21.6 |
9afa696 to
732f946
Compare
732f946 to
375a424
Compare
Member
Author
|
Rebased to 1.21.7 |
375a424 to
af5bb54
Compare
Member
Author
|
Rebased to 1.21.8 |
lynxplay
reviewed
Jul 26, 2025
...i/src/main/java/io/papermc/paper/command/brigadier/argument/resolvers/ObjectiveResolver.java
Show resolved
Hide resolved
lynxplay
reviewed
Jul 26, 2025
...r/src/main/java/io/papermc/paper/command/brigadier/argument/VanillaArgumentProviderImpl.java
Outdated
Show resolved
Hide resolved
lynxplay
reviewed
Jul 26, 2025
paper-api/src/main/java/io/papermc/paper/command/brigadier/argument/operation/Operation.java
Outdated
Show resolved
Hide resolved
Lulu13022002
reviewed
Aug 3, 2025
...src/main/java/io/papermc/paper/command/brigadier/argument/operation/ScoreboardOperation.java
Outdated
Show resolved
Hide resolved
paper-api/src/main/java/io/papermc/paper/command/brigadier/argument/resolvers/TeamResolver.java
Outdated
Show resolved
Hide resolved
paper-server/patches/sources/net/minecraft/commands/arguments/TeamArgument.java.patch
Outdated
Show resolved
Hide resolved
paper-server/src/main/java/io/papermc/paper/PaperServerInternalAPIBridge.java
Outdated
Show resolved
Hide resolved
73a3411 to
f2f06c0
Compare
Member
Author
|
Fixed the compile time errors, woops 😅 |
21d52af to
eb87d6a
Compare
Member
Author
|
✨ Rebased for 1.21.9 ✨ |
Member
Author
|
Updated the PR for 1.21.11 |
This comment was marked as resolved.
This comment was marked as resolved.
Member
Member
Author
|
Updated to 26.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #12540
This PR exposes a few scoreboard related Vanilla arguments for use in-API.
OperationArgumentScoreHolderArgumentObjectiveArgumentwhilst this argument is just a wrapper around a String, since it provides potentially useful errors, I decided to expose it anywaysTeamArgumentsame as theObjectiveArgumentOperation Argument
(Brigadier jumpscare!) Operation argument usage preview
Code:
ScoreHolder Argument
In addition to adding the argument, I have also taken the liberty of exposing a
ScoreHolderinterface, which is implemented by all entities,OfflinePlayer, and also has a string-only implementation.(Brigadier jumpscare!) ScoreHolder argument usage preview
Preview:Code:
Objective argument
(Brigadier jumpscare!) Objective argument usage preview
Objective argument (writable)
Vanilla differentiates between writable and non-writable objectives when resolving. Therefore, there is a second set of methods exposed on the
ObjectiveResolver, which do this additional 'writable criteria' check.(Brigadier jumpscare!) Objective argument usage with writable resolvers
Team argument
This argument has a custom resolver attached to it in order to allow resolving not only for the main server scoreboard, but also any additional scoreboard. This is not a feature of the nms ScoreboardArgument, but I thought this might be a good thing to add for plugin reasons.
(Brigadier jumpscare!) Team argument usage preview