-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Expose certain scoreboard related argument types #12541
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
Open
Strokkur424
wants to merge
18
commits into
PaperMC:main
Choose a base branch
from
Strokkur424:feat/operation-argument
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
lynxplay
requested changes
May 11, 2025
Contributor
lynxplay
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
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