Usage Example
Behavior
-
The method requires that a timer already exists.
- If no active timer is found, the method will fail and return
false.
- If no active timer is found, the method will fail and return
-
Available actions (
modifier):Modifier Description "add"Adds time to the current timer ( HH:MM:SSformat)."take"Subtracts time from the timer ( HH:MM:SSformat, not below00:00:00)."set"Sets the timer to an exact duration. "bossbar_color"Changes the BossBar’s color. Must be a valid BarColor."bossbar_style"Changes the BossBar’s style. Must be a valid BarStyle."text"Updates the BossBar’s displayed text. Color codes ( &) are supported."sound"Sets the name of the sound effect used. Must be a valid sound identifier. "sound_enable"Enables or disables sound ( "true"/"false")."sound_volume"Sets the sound volume ( floatbetween0.1and2.0)."sound_pitch"Sets the sound pitch ( floatbetween0.1and2.0). -
When modified:
- The BossBar and other settings update in real time.
- The
MODIFYevent is triggered. - Config changes (color, style, sound, etc.) are persisted to the timer’s config file.
Parameters
Action to perform on the timer.The available actions are
"add", "take", "set", "bossbar_color", "bossbar_style", "text", "sound", "sound_enable", "sound_volume", "sound_pitch".The new value to apply for the chosen modifier.
Reference to the player who performed the action.
- If a player passes, they will receive a message indicating that the timer was modified
- It is usually not necessary to use it directly in the API
Returns
Indicates whether the operation succeeded.
true— Timer exists and modification applied successfully.false— Invalid parameters or no active timer.
