public interface ITimers
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Removes all timers.
|
void |
forceStart(int id,
int ticks,
boolean repeat)
Adds a timer to the NPC or player with the given attributes.
|
boolean |
has(int id) |
int |
maxTicks(int id) |
boolean |
repeats(int id) |
void |
reset(int id)
Resets the ticks elapsed in the timer with the given id to 0.
|
void |
setMaxTicks(int id,
int maxTicks)
Sets the maximum amount of ticks the timer with the given id can run for before it stops.
|
void |
setRepeats(int id,
boolean repeat)
Sets whether the timer with the given id repeats or not.
|
void |
setTicks(int id,
int ticks)
Sets the amount of ticks elapsed in the timer with the given id to a different value.
|
int |
size() |
void |
start(int id,
int ticks,
boolean repeat)
Adds a timer to the NPC or player with the given attributes.
|
boolean |
stop(int id)
Stops the timer with the given id
|
int |
ticks(int id) |
void start(int id,
int ticks,
boolean repeat)
id - The id of the timer.ticks - The amount of ticks before the timer ends.repeat - Whether this timer repeats when it reaches its maximum amount of ticks.void forceStart(int id,
int ticks,
boolean repeat)
id - The id of the timer.ticks - The amount of ticks before the timer ends.repeat - Whether this timer repeats when it reaches its maximum amount of ticks.boolean has(int id)
boolean stop(int id)
void reset(int id)
void clear()
int ticks(int id)
void setTicks(int id,
int ticks)
ticks - The new ticks elapsed by the timer.int maxTicks(int id)
void setMaxTicks(int id,
int maxTicks)
boolean repeats(int id)
void setRepeats(int id,
boolean repeat)
int size()