Provides a way to create and manage publicly-announced countdowns. Long timers announce once an hour (e.g. "7h left"). During the last hour, timer announces more often: every 10 minutes, then every minute, then every 10 seconds, and finally every second - until the timer is up.
More...
|
| void | Abort () |
| | Stops this timer, and removes it from the list of timers.
|
| |
|
| static ChatTimer | Start (TimeSpan duration,[CanBeNull] string message,[NotNull] string startedBy) |
| | Starts this timer with the specified duration, and end message.
|
| |
| static ChatTimer | FindTimerById (int id) |
| | Searches for a timer by its numeric ID.
|
| |
|
| readonly int | ID |
| | Timer's unique numeric ID.
|
| |
|
| static readonly TimeSpan | MinDuration = TimeSpan.FromSeconds( 1 ) |
| | Minimum allowed timer duration (one second).
|
| |
|
| bool | IsRunning [get, set] |
| | Whether or not the timer is currently running.
|
| |
| bool | Aborted [get, set] |
| | Whether this timer has been aborted.
|
| |
| string | Message [get, set] |
| | Message to be displayed once the timer reaches zero.
|
| |
| DateTime | StartTime [get, set] |
| | Date/Time (UTC) at which this timer was started.
|
| |
| DateTime | EndTime [get, set] |
| | Date/Time (UTC) at which this timer will end.
|
| |
| TimeSpan | Duration [get, set] |
| | The amount of time between when this timer was started and when it will end.
|
| |
| TimeSpan | TimeLeft [get] |
| | The amount of time remaining in this timer.
|
| |
| string | StartedBy [get, set] |
| | Name of the player (or entity) who started this timer
|
| |
| static ChatTimer[] | TimerList [get] |
| | Returns a list of all active timers.
|
| |
Provides a way to create and manage publicly-announced countdowns. Long timers announce once an hour (e.g. "7h left"). During the last hour, timer announces more often: every 10 minutes, then every minute, then every 10 seconds, and finally every second - until the timer is up.
| void fCraft.ChatTimer.Abort |
( |
| ) |
|
Stops this timer, and removes it from the list of timers.
| static ChatTimer fCraft.ChatTimer.FindTimerById |
( |
int |
id | ) |
|
|
static |
Searches for a timer by its numeric ID.
- Parameters
-
- Returns
- ChatTimer object if found; null if not found.
| static ChatTimer fCraft.ChatTimer.Start |
( |
TimeSpan |
duration, |
|
|
[CanBeNull] string |
message, |
|
|
[NotNull] string |
startedBy |
|
) |
| |
|
static |
Starts this timer with the specified duration, and end message.
- Parameters
-
| duration | Amount of time the timer should run before completion. Should not be less than ChatTimer.MinDuration. |
| message | Message to display when timer reaches zero. May be null. |
| startedBy | Name of player who started timer. May not be null. |
- Returns
- Newly-created, and already-started timer.
- Exceptions
-
| ArgumentNullException | startedBy is null. |
| ArgumentOutOfRangeException | duration is less than ChatTimer.MinDuration. |
| readonly int fCraft.ChatTimer.ID |
Timer's unique numeric ID.
| readonly TimeSpan fCraft.ChatTimer.MinDuration = TimeSpan.FromSeconds( 1 ) |
|
static |
Minimum allowed timer duration (one second).
| bool fCraft.ChatTimer.Aborted |
|
getset |
Whether this timer has been aborted.
| TimeSpan fCraft.ChatTimer.Duration |
|
getset |
The amount of time between when this timer was started and when it will end.
| DateTime fCraft.ChatTimer.EndTime |
|
getset |
Date/Time (UTC) at which this timer will end.
| bool fCraft.ChatTimer.IsRunning |
|
getset |
Whether or not the timer is currently running.
| string fCraft.ChatTimer.Message |
|
getset |
Message to be displayed once the timer reaches zero.
| string fCraft.ChatTimer.StartedBy |
|
getset |
Name of the player (or entity) who started this timer
| DateTime fCraft.ChatTimer.StartTime |
|
getset |
Date/Time (UTC) at which this timer was started.
| TimeSpan fCraft.ChatTimer.TimeLeft |
|
get |
The amount of time remaining in this timer.
Returns a list of all active timers.
Occurs after a ChatTimer has expired or was aborted.
The documentation for this class was generated from the following file: