Enum minecraft_json::minecraft::text::ClickEventAction[][src]

pub enum ClickEventAction {
    OpenUrl,
    OpenFile,
    RunCommand,
    SuggestCommand,
    ChangePage,
    CopyToClipboard,
}
Expand description

Action performed upon a ClickEvent.

Variants

OpenUrl

Opens value as a URL in the user’s default web browser.

OpenFile

Opens the file at value on the user’s computer. This is used in messages automatically generated by the game (e.g., on taking a screenshot) and cannot be used by players for security reasons.

RunCommand

Works in signs, but only on the root text component, not on any children. Activated by using the sign. In chat and written books, this has value entered in chat as though the player typed it themselves and pressed enter. This can be used to run commands, provided the player has the required permissions. Since they are being run from chat, commands must be prefixed with the usual "/" slash. In signs, the command is run by the server at the sign’s location, with the player who used the sign as @s. Since they are run by the server, sign commands have the same permission level as a command block instead of using the player’s permission level, are not restricted by chat length limits, and do not need to be prefixed with a "/" slash.

SuggestCommand

Opens chat and fills in value. If a chat message was already being composed, it is overwritten. This does not work in books.

ChangePage

Can only be used in written books. Changes to page value if that page exists.

CopyToClipboard

Copies value to the clipboard.

Trait Implementations

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.