On Dialog Click (Event) — Skript

Addon: Skript · Category: Event

Syntax

[on] dialog (click|action) [%string%]

Description

Called when a player clicks a dialog button that carries a custom action, and for any other custom click packet the client sends. Buttons created with 'new dialog button ... running code' are handled by their own code instead and never reach this event. The input values of the dialog are available through the 'dialog input' expression when the button used a dynamic custom action.

Event Values

  • event-entity
  • event-instance
  • event-nbtcompound
  • event-player
  • event-string

Examples

on dialog click "myserver:buy":
	send "You clicked buy!" to player

on dialog click:
	send "raw action: %event-string%" to player

View source