Click event

Helpers that build a minecraft:click_event object, one for each of its types. Where a field takes one, write the helper's call; its name is the type it makes. Click a type to see what it accepts.

ChangePage

ChangePage
ChangePage(page)
page
int 1..

The page number to go to.

CopyToClipboard

CopyToClipboard
CopyToClipboard(value)
value
string

The text value to copy to the clipboard.

Custom

Custom
Custom(id, payload?)
id
id

ID of a custom action. Has no functionality on vanilla servers.

payloadoptional
any (depends on id)

OpenUrl

OpenUrl
OpenUrl(url)
url
string

RunCommand

RunCommand
RunCommand(command)
command
string

ShowDialog

ShowDialog
ShowDialog(dialog)
dialog
dialog id | Dialog

SuggestCommand

SuggestCommand
SuggestCommand(command)
command
string