Repository navigation
Timer Commands
A timer carries a list of commands. Each one has a moment it runs at and a pause it takes afterwards.
/timer commands <name> [add <h> <m> <s> <cmd> | add finish <cmd> | list | remove <index> | clear]
At the end. add finish puts a command at the moment the timer reaches
zero — or its length, counting up.
/timer commands event add finish say The event is over!
Along the way. Giving a time instead runs it as the counter passes that mark.
/timer commands event add 0 0 10 say 10 seconds left!
/timer commands event add 0 1 0 effect give @a speed 30
The time is read the way the counter shows it. On a countdown, 0 0 10 is ten
seconds remaining; counting up, it is ten seconds elapsed.
Several at one moment is fine. They run in the order you added them.
A timer may have no commands at all. That is a perfectly good timer — plenty of them exist only to be looked at.
Every command carries a pause taken after it, before the next one in the same batch. Zero, which is the default, means the next one runs immediately.
This is what a sequence looks like:
say Three wait 20
say Two wait 20
say One wait 20
say Go! wait 0
Four commands at the same moment, a second between each. The pause belongs to the command in front of it, so the last one's pause is never used.
Set it in the Admin Panel or the Web Panel, in the box beside the command.
/timer commands event list
/timer commands event remove 2
/timer commands event clear
list numbers them; remove takes that number.
Commands run at operator level, from the server.
An execution that belongs to one player runs its commands as that player,
from where they are standing — so @s means them and relative coordinates work
from their position. A shared or global execution has no single owner and runs
from the world's origin instead.
That is what makes each mode useful: fifty personal timers can each run
effect give @s regeneration 10 and reach fifty different people.
Commands may contain placeholders, replaced at the moment the batch is reached:
About the timer:
{name} |
its name |
{time} |
its clock, as shown |
{seconds} |
the same, in seconds |
{ticks} |
the same, in ticks |
{target} |
its full length, in ticks |
{mode} |
countdown or count-up
|
About the execution, which is what makes a personal timer able to act on its own player:
{player} |
the player it belongs to, if it belongs to one |
{uuid} |
their UUID |
{run} |
a short id for this execution |
/timer commands event add finish say {name} finished at {time}
/timer commands challenge add finish give {player} diamond
A timer running for fifty people in each mode fills {player} in fifty
times, differently. A shared execution has no owner, so it leaves those three
empty.
Other mods can add their own — see API.
A command that fails is logged and the rest still run. One bad command does not stop the batch.