You can now add a cooldown for your actions! Just set "cooldown" in the action (in ticks), or "cooldownSeconds" in the action. If you want actions to run if the player hasn't cooled down, then add an action list under "notCooledDownActions":
Code (YAML):
action
: sendMessage
message
:
"This message requires a 10 second cooldown"
cooldown
: 200
# This is 10 seconds in ticks
# Or, you can just use this, which is equivalent to the above line
cooldownSeconds
: 10
notCooledDownActions
:
-
action
: sendMessage
message
:
"You haven't cooled down yet!"
This version also adds the placeholder "{cui.action.id}", which will be replaced with a unique number identifier for the action that was run — this will likely only have uses for advanced users.