Skip to main content

Usage Example

Behavior

  • The method requires that a timer already exists.
    • If no active timer is found, the method will fail and return false.
  • Available actions (modifier):
  • When modified:
    • The BossBar and other settings update in real time.
    • The MODIFY event is triggered.
    • Config changes (color, style, sound, etc.) are persisted to the timer’s config file.

Parameters

string
required
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".
string
required
The new value to apply for the chosen modifier.
  • For time modifiers: HH:MM:SS (e.g. "00:05:30")
  • For BossBar color: any valid BarColor
  • For BossBar style: any valid BarStyle
  • For sound settings: depends on the modifier
    • sound: valid sound name (vanilla or custom)
    • sound_enable: "true" or "false"
    • sound_volume / sound_pitch: float between 0.1 and 2.0
CommandSender
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

boolean
Indicates whether the operation succeeded.
  • true — Timer exists and modification applied successfully.
  • false — Invalid parameters or no active timer.