-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Feat: Add 'with' methods to CommandSourceStack #11868
Merged
Machine-Maker
merged 4 commits into
PaperMC:main
from
Strokkur424:dev-brigadier-commandcontextextension
Jan 11, 2025
Merged
Feat: Add 'with' methods to CommandSourceStack #11868
Machine-Maker
merged 4 commits into
PaperMC:main
from
Strokkur424:dev-brigadier-commandcontextextension
Jan 11, 2025
Conversation
This file contains 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
paper-api/src/main/java/io/papermc/paper/command/brigadier/CommandSourceStack.java
Outdated
Show resolved
Hide resolved
paper-server/patches/sources/net/minecraft/commands/CommandSourceStack.java.patch
Outdated
Show resolved
Hide resolved
paper-server/src/main/java/io/papermc/paper/command/brigadier/PaperCommandSourceStack.java
Show resolved
Hide resolved
paper-server/patches/sources/net/minecraft/commands/CommandSourceStack.java.patch
Outdated
Show resolved
Hide resolved
paper-server/src/main/java/io/papermc/paper/command/brigadier/PaperCommandSourceStack.java
Outdated
Show resolved
Hide resolved
Because it isn't required to construct a CSS initially, think console
commands
…On Wed, 1 Jan 2025, 22:19 Strokkur24, ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In
paper-server/src/main/java/io/papermc/paper/command/brigadier/PaperCommandSourceStack.java
<#11868 (comment)>:
> @@ -40,6 +42,12 @@ default Entity getExecutor() {
return nmsEntity.getBukkitEntity();
}
+ @OverRide
+ @nonnull
+ default CommandSourceStack ***@***.*** Entity executor) {
In that case, how is it possible that the Bukkit CSS has their withEntity
nullable?
—
Reply to this email directly, view it on GitHub
<#11868 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIPXWBBRC6XMPIP6OQEQY5L2ISH3NAVCNFSM6AAAAABUMCAM3OVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDKMRWHE2TSNRUGY>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
kennytv
approved these changes
Jan 11, 2025
lynxplay
force-pushed
the
dev-brigadier-commandcontextextension
branch
from
January 11, 2025 19:20
585e796
to
e8e5a02
Compare
Machine-Maker
approved these changes
Jan 11, 2025
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.
fixes #11866
The following methods have been added:
CommandSourceStack#withExecutor(@Nullable Entity)
CommandSourceStack#withLocation(Location location)
JavaDocs hasn't been added yet, but that is something I will be doing very soon.
Testing the code can be done via the following:
Running
/test run
works as expected, printing out the executing player's location.Running
/testwith @e[limit=2,type=!player] run run
also works, printing out two entities names and locations.