A Paper plugin providing independent per-player timers for Minecraft servers.
Each player has their own timer which can:
Designed for:
/execute as| Command | Description |
|---|---|
/playertimer startcountup |
Start a countup timer |
/playertimer startcountdown |
Start a 5 minute countdown |
/playertimer startcountdown <duration> |
Start a countdown with custom duration |
/playertimer pause |
Pause the timer |
/playertimer resume |
Resume a paused timer |
/playertimer stop |
Stop the timer and hide it |
/playertimer reset |
Reset timer to 00:00 |
/playertimer hide |
Hide the timer display |
/playertimer show |
Show the timer display |
The countdown command accepts multiple input formats.
/playertimer startcountdown 300
Starts a 300 second countdown.
/playertimer startcountdown 05:30
Starts a 5 minute 30 second countdown.
Rules:
mm must be between 0 and 59ss must be between 0 and 59Examples:
05:30 ✓ valid
59:59 ✓ valid
60:00 ✗ invalid
05:60 ✗ invalid
99:99 ✗ invalid
/playertimer startcountdown 01:40:05
Starts a 1 hour 40 minute 5 second countdown.
Rules:
mm must be between 0 and 59ss must be between 0 and 59Examples:
01:40:05 ✓ valid
10:59:59 ✓ valid
01:60:05 ✗ invalid
01:40:60 ✗ invalid
/playertimer startcountdown 1h40m5s
/playertimer startcountdown 10m
/playertimer startcountdown 45s
/playertimer startcountdown 2h
/playertimer startcountdown 1h5s
Supports:
h)m)s)Any combination may be used.
Rules:
m must be between 0 and 59s must be between 0 and 59Examples:
1h40m5s ✓ valid
10m30s ✓ valid
59m59s ✓ valid
1h60m ✗ invalid
10m90s ✗ invalid
10s49m ✗ invalid
The maximum allowed duration is:
2147483647 seconds
which is approximately:
68 years
This limit exists because the timer internally uses Java int values.
Internally the plugin tracks timer state using a finite state model.
| State | Meaning |
|---|---|
READY |
Timer exists but has not started |
RUNNING |
Timer is actively counting |
PAUSED |
Timer is temporarily halted |
STOPPED |
Timer was manually stopped |
FINISHED |
Countdown reached zero |
This prevents invalid operations such as:
Timer visibility is independent of timer state.
| Action | Result |
|---|---|
| Start timer | Timer becomes visible |
| Pause timer | Timer remains visible |
| Resume timer | Timer becomes visible |
| Stop timer | Timer becomes hidden |
| Reset timer | Timer remains visible |
| Hide command | Timer becomes hidden |
| Show command | Timer becomes visible |
When a countdown reaches zero:
FINISHED stateCommands can be triggered via command blocks using Minecraft's execute command.
Example:
execute as @p run playertimer startcountdown 5m
This allows:
./gradlew build
Compiled jars will appear in:
build/libs/
PlayerTimer uses the following versioning scheme:
[target-minecraft-version]-[plugin-version]
Example:
26.1.x-1.0
Meaning:
PlayerTimerServicePlayerTimer model classPlayerTimerAPI interface groundworkTimerMode and TimerState into dedicated enum filesPlayerTimerPlugin to focus on plugin lifecycle and command registration/execute as @pPlayerTimer objectsMIT License