Name | Clickable |
Syntax | clickable (<script>/cancel:<id>) (def:<element>|.../defmap:<map>/def.<name>:<value>) (usages:<#>) (for:<player>|...) (until:<duration>) |
Short Description | Generates a clickable command for players. |
Full Description | Generates a clickable command for players.
Specify a task script to run, or put an executable script section as sub-commands. When running a task, optionally any definitions to pass. When using a sub-section, the running commands will be in their own queue, but copy out the original queue's definitions and context source. Optionally specify a maximum number of usages (defaults to unlimited). Optionally specify a maximum duration it can be used for with 'until'. If no duration is specified, the clickable will remain valid until the server stops or restarts. WARNING: if you use clickables very often without a duration limit, this can lead to a memory leak. Clickables that have a specified max duration will occasionally be cleaned from memory. Optionally specify what players are allowed to use it. Defaults to unrestricted (any player may use it). Players will need the permission "denizen.clickable" to be able to use this. You can cancel a clickable at any time via "cancel:<id>", where ID is the generated ID from saving the initial generated command. |
Related Tags | <entry[saveName].command> returns the command to use in "on_click".
<entry[saveName].id> returns the generate command's ID.
<ElementTag.on_click[<command>]> Adds a click command to the element, which makes the element execute the input command when clicked. (...)
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Group | player |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/player/ClickableCommand.java#L38 |