Skript Plugin Wiki › Guides › Create Timed Events and Cooldowns
Create Timed Events and Cooldowns
Scheduling Actions with Delays
Skript lets you delay actions or repeat them at intervals. This is perfect for cooldowns, scheduled announcements, or time-based rewards.
Simple Delays
`
command /teleport:
trigger:
send "Teleporting in 5 seconds..." to player
teleport player to spawn
send "Teleported!" to player
`
The command sends a message, waits, then teleports the player.
Cooldowns
Prevent players from spamming commands using variables:
`
command /special:
trigger:
if {cooldown::%player%} is set:
" to player
stop
set {cooldown::%player%} to true
send "Special ability activated!" to player
delete {cooldown::%player%}
`
This blocks the command for 30 seconds after use. The stop keyword exits the trigger early. You can also use every for repeating tasks that run continuously on your server.