Skip to content

Add an event for per player Quick Actions & Pause Menu Addition Dialogs#13917

Open
Hugo5000 wants to merge 1 commit into
PaperMC:mainfrom
Hugo5000:per-player-quick-actions-and-pause-menu-additions
Open

Add an event for per player Quick Actions & Pause Menu Addition Dialogs#13917
Hugo5000 wants to merge 1 commit into
PaperMC:mainfrom
Hugo5000:per-player-quick-actions-and-pause-menu-additions

Conversation

@Hugo5000
Copy link
Copy Markdown

I kinda know, the likelyhood that this will be accepted is slim, but this PR adds per player Quick Actions & Pause Menu Additions by hijacking the default Quick Actions & Custom Options dialogs and adding it to the corresponding Tag.

I would have rather wanted to add 2 extra pre packaged dialogs, but I couldn't find out how to do that.

example usage:

    @EventHandler
    public void onPlayerDialog(PlayerDialogsReceiveEvent event) {
        getLogger().info("Setting Dialog");
        event.setPauseMenuAdditions(Dialog.create(builder -> builder.empty()
            .base(DialogBase.builder(Component.text(event.getConnection().getProfile().getName() + "'s Pause Menu")).build())
            .type(DialogType.notice())
        ));
        event.setQuickAction(Dialog.create(builder -> builder.empty()
            .base(DialogBase.builder(Component.text(event.getConnection().getProfile().getName() + "'s Quick Actions")).build())
            .type(DialogType.notice())
        ));
    }

…t we can do per player quick actions and pause manu additions
@Hugo5000 Hugo5000 requested a review from a team as a code owner May 27, 2026 16:50
@github-project-automation github-project-automation Bot moved this to Awaiting review in Paper PR Queue May 27, 2026
@masmc05
Copy link
Copy Markdown
Contributor

masmc05 commented May 27, 2026

I would have rather wanted to add 2 extra pre packaged dialogs, but I couldn't find out how to do that.

You can register them in bootstrap. Just add the dialogs in registry events then reference them in corresponding tag in the tags pre flatten events

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Awaiting review

Development

Successfully merging this pull request may close these issues.

2 participants