Repository navigation
Add PlayerDialogClickEvent - #277
Closed
kazotaruumc72 wants to merge 1 commit into
Closed
kazotaruumc72 wants to merge 1 commit into
kazotaruumc72 wants to merge 1 commit into
Conversation
Called when a player clicks a custom-click button of a dialog, before its actions run. Gives the dialog file name and the button key. Cancelling it prevents the actions from running. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 7, 2026
Repository owner
locked and limited conversation to collaborators
Nov 7, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
Adds
PlayerDialogClickEvent(fr.maxlego08.menu.api.event.events), called when a player clicks acustom-clickbutton of a dialog, before the actions of the button run.getPlayer()getDialogName(): file name of the dialog without.yml(same value asDialogInventory#getFileName)getButtonName(): last segment of the button's configuration path:button1formulti-actions.button1,yes/nofor a confirmation dialog,notice,exit-button, ...Use case: plugins reacting to dialog buttons without adding actions to every dialog file, e.g. a
DIALOG_CLICKquest type in zQuests (Maxlego08/zQuests PR to follow).Implementation
ZCustomClickDialogActionLoaderpasses the dialog name (from the file) and the button key (from the path) toZCustomClickDialogAction.ZCustomClickDialogActioncalls the event at the start of its click callback. The previous constructor is kept and does not call the event.Note: canvas
clickvalues also go throughZCustomClickDialogActionLoader; for them the button name is the last segment of the click path.Test plan
./gradlew :API:compileJava :Hooks:Paper:compileJavapasses🤖 Generated with Claude Code