Skip to content

Add CommandSourceStack to UnknownCommandEvent#13083

Merged
lynxplay merged 1 commit intoPaperMC:mainfrom
mbax:uce-css
Oct 5, 2025
Merged

Add CommandSourceStack to UnknownCommandEvent#13083
lynxplay merged 1 commit intoPaperMC:mainfrom
mbax:uce-css

Conversation

@mbax
Copy link
Contributor

@mbax mbax commented Sep 20, 2025

This commit exposes the CommandSourceStack to the UnknownCommandEvent.

I felt modifying the constructor instead of deprecating was fine due to the @ApiStatus.Internal label on the constructor.

As an example use case, the cloud command library has a lovely help generator, and all of cloud's Paper support is built around CommandSourceStack. Personally I'd want this event to expose the stack so I can listen in my plugin and display the help output to users, but also it could potentially be PR'd to the library itself to support automatically sending help to commands as a larger improvement.

I also cleaned up the javadocs in the event a little.

@mbax mbax requested a review from a team as a code owner September 20, 2025 15:43
@github-project-automation github-project-automation bot moved this to Awaiting review in Paper PR Queue Sep 20, 2025
@lynxplay lynxplay merged commit 4dcd837 into PaperMC:main Oct 5, 2025
5 checks passed
@github-project-automation github-project-automation bot moved this from Awaiting review to Merged in Paper PR Queue Oct 5, 2025
Toffikk added a commit to Toffikk/Paper that referenced this pull request Oct 13, 2025
Squashed commit of the following:

commit c33a9ce
Author: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
Date:   Mon Oct 13 14:10:41 2025 -0700

    Fix incorrect variable use in Entity#startRiding

    This diff applied and compiled after updating Parchment, but was incorrectly pointing to a field instead of the parameter

    fixes PaperMC#13182

commit ffcb7b2
Author: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
Date:   Mon Oct 13 21:55:54 2025 +0200

    Update Parchment (PaperMC#13177)

    Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
    Co-authored-by: Pedro <3602279+Doc94@users.noreply.github.com>

commit 610f1d2
Author: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
Date:   Sat Oct 11 18:30:55 2025 -0700

    Update fill-gradle to v1.0.9

commit 9d95cd5
Author: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
Date:   Sat Oct 11 17:52:08 2025 -0700

    Use BUILD_STARTED_AT instead of Instant.now() for build timestamp (PaperMC#13175)

commit ce983d7
Author: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
Date:   Sat Oct 11 16:49:08 2025 -0700

    Misc fixes to tick reporting (PaperMC#13174)

commit ba2fb8c
Author: lucko <git@lucko.me>
Date:   Sat Oct 11 14:56:31 2025 +0100

    Update spark-paper dependency version (PaperMC#13171)

commit a0ea729
Author: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
Date:   Fri Oct 10 19:19:55 2025 -0700

    Fix minimum tick time reporting and off thread reading

commit 056268e
Author: JustAHuman-xD <65748158+JustAHuman-xD@users.noreply.github.com>
Date:   Fri Oct 10 19:19:03 2025 -0500

    [ci skip] Correct javadoc for Weapon Component (PaperMC#13096)

commit fba780d
Author: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date:   Tue Oct 7 11:22:54 2025 -0700

    Rebuild patches

    Actually do what the last commit said it was doing...

commit fa57d4b
Author: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date:   Tue Oct 7 11:19:00 2025 -0700

    Remove Vanilla packet processing at start of tick

    Our call to runAllTasksAtTickStart() runs that logic and
    times it correctly, whereas Vanilla does not record task execution
    time for it.

commit 3982efa
Author: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date:   Tue Oct 7 11:15:12 2025 -0700

    Sync Moonrise

    See Tuinity/Moonrise@b2968ce#diff-4ac4a0af7a908348ccdb1ae58ba7819ec41e5ba3f599e058f7060aa06331cacd
    We already perform a watchdog shutdown on Paper so these changes
    are just to keep the codebases in-sync.

commit 8339bb3
Author: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date:   Tue Oct 7 11:04:57 2025 -0700

    Update DataConverter constants for 1.21.10

    PaperMC/DataConverter@77cc8c2

commit bae47d3
Author: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
Date:   Tue Oct 7 11:00:42 2025 -0700

    Update to 1.21.10 (PaperMC#13127)

    Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>

commit 0ff899d
Author: Bjarne Koll <git@lynxplay.dev>
Date:   Tue Oct 7 12:32:34 2025 +0100

    Prevent world mutation on copper golem spawn cancel (PaperMC#13152)

commit e9fa3a7
Author: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date:   Mon Oct 6 20:59:42 2025 -0700

    Use correct queue when blocking on futures

    See Tuinity/Moonrise@a3ac9c7

commit 914fb08
Author: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date:   Mon Oct 6 13:08:03 2025 -0700

    Fix Entity#updateFluidHeightAndDoFluidPushing inconsistency with Vanilla

    See Tuinity/Moonrise@57982e2

commit 8483163
Author: Bjarne Koll <git@lynxplay.dev>
Date:   Mon Oct 6 20:49:10 2025 +0200

    Yield millis from Bukkit#getAverageTickTime

commit b3d2158
Author: Shane Freeder <theboyetronic@gmail.com>
Date:   Mon Oct 6 18:04:03 2025 +0100

    Disable javadoc.io links

    revert me when jd.io comes back, maybe

commit b4b1f11
Author: Pedro <3602279+Doc94@users.noreply.github.com>
Date:   Mon Oct 6 13:55:32 2025 -0300

    [ci skip] Add docs for virtual createMerchant in MerchantInventoryViewBuilder#merchant (PaperMC#13125)

commit ffd5158
Author: Maddy Miller <git@madelinemiller.dev>
Date:   Tue Oct 7 02:52:40 2025 +1000

    Update 1.21.9 reobf mappings data (PaperMC#13135)

commit 4dcd837
Author: Matt Baxter <matt@phozop.net>
Date:   Sun Oct 5 18:20:51 2025 -0400

    Add CommandSourceStack to UnknownCommandEvent (PaperMC#13083)

commit 523efa4
Author: Bjarne Koll <git@lynxplay.dev>
Date:   Mon Oct 6 00:18:09 2025 +0200

    Flatten currentTick incr into file patches

commit b63dc92
Author: Shane Freeder <theboyetronic@gmail.com>
Date:   Sun Oct 5 18:51:42 2025 +0100

    Restore currentTick counter increment as temp feature patch

commit dc66e8c
Author: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date:   Sat Oct 4 19:21:23 2025 -0700

    Return Server#getTPS over minute intervals instead of seconds

commit a4a7461
Author: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date:   Sat Oct 4 11:41:00 2025 -0700

    Rebase fixups

    Oops

commit dcd7847
Author: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date:   Sat Oct 4 11:34:59 2025 -0700

    Improve server tick loop

    See Tuinity/Moonrise@0b842a9

commit 21b4930
Author: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date:   Fri Oct 3 11:08:41 2025 -0700

    Fix diff in FlowingFluid#canPassThroughWall

    The function should not be returning false if the block states
    are uncachable.

commit e0ba395
Author: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
Date:   Fri Oct 3 10:56:39 2025 -0700

    Add missing plugin ticket comparator fixes PaperMC#13130
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Merged

Development

Successfully merging this pull request may close these issues.

5 participants