Commands
Actions support some custom commands. Note that these are not actual commands that can be executed in chat and they only work inside actions.
Commands
Regular
sound - send a sound to a player
message - send a message to a player
delay - send multiple commands to player after a delay
Variables
setvar - set a global or player variable
setpersistentvar - set a global or player persistent variable
clearvar - clear a global or player variable
clearpersistentvar - clear a global or player persistent variable
clearvars - clear all global or player variables
clearpersistentvars - clear all global or player persistent variables
savepersistentvars - save all persistent variables to the file
Animations
skip - skip animations
Regular
sound
Send a sound to the player viewing the tooltip.
Arguments
Examples
actions:
on-show:
- sound minecraft:block.amethyst_block.break master 1 1
right-click:
- sound custom:mysoundname master 1 1
message
Send a message to the player viewing the tooltip. Supports hex, PAPI placeholders and local placeholders.
Arguments
Message
Examples
actions:
on-show:
- message Welcome traveller!
left-click:
- message &cOuch!
delay
Send an array of commands to the player viewing the tooltip after a specific given delay. Commands are separated with a ;
and support both local commands (on this page) and outside commands. Supports all placeholders.
Arguments
Time (ticks, 1 second = 20 minecraft ticks)
Commands (separated with a ; )
Examples
actions:
on-stop-showing:
# After 1 second, message hello and kill the player
- delay 20 message Hello!; kill %player%
# After 5 seconds, set variable meow to false
- delay 100 setvar player meow false
Variables
setvar
Set a non-persistent variable for the given player or globally. Supports PAPI placeholders and local placeholders.
Arguments
Scope [ player / global / insert players name ]
Variable name (supports placeholders)
Value (supports mathematical evaluation)
Examples
actions:
on-stop-showing:
# Scope here is global,
# variable name is meow
# and value is 1
- setvar global meow 1
setpersistentvar
Set a persistent variable for the given player or globally. Supports PAPI placeholders and local placeholders.
Arguments
Scope [ player / global / insert players name ]
Variable name (supports placeholders)
Value (supports mathematical evaluation)
Examples
actions:
on-stop-showing:
# Add 1 for each time the player looks at this tooltip
- setpersistentvar player looked %persistentvar_looked% + 1
clearvar
Clear a non-persistent variable for the given player or globally. Supports PAPI placeholders and local placeholders.
Arguments
Scope [ player / global / insert players name ]
Variable name (supports placeholders)
Examples
actions:
on-stop-showing:
# Clears the "meow" variable, effectively removing it
- clearvar player meow
clearpersistentvar
Clear a persistent variable for the given player or globally. Supports PAPI placeholders and local placeholders.
Arguments
Scope [ player / global / insert players name ]
Variable name (supports placeholders)
Examples
actions:
on-stop-showing:
# Clears the "meow" variable, effectively removing it
- clearpersistentvar player looked
clearvars
Clear all non-persistent variables for either a given player or globally.
Arguments
Scope [ player / global / insert players name ]
Examples
actions:
on-stop-showing:
# Clear all global variables
- clearvars global
# Clear all players variables
- clearvars player
clearpersistentvars
Clear all persistent variables for either a given player or globally.
Arguments
Scope [ player / global / insert players name ]
Examples
actions:
on-stop-showing:
# Clear all persistent global variables
- clearpersistentvars global
# Clear all persistent players variables
- clearpersistentvars player
savepersistentvars
Save all persistent variables.
Examples
actions:
on-stop-showing:
- savepersistentvars
Animations
skip
Skips animations depending on given arguments. Note that the animations have to have an ID to be able to be skipped.
Arguments
Skipped [ current / all ]
Examples
actions:
left-click:
# Skips the current running animation
- skip current
# Skips ALL animations in the preset
- skip all
Last updated