Package noppes.npcs.api
Interface ITimers
public interface ITimers
-
Method Summary
Modifier and Type Method Description void
clear()
void
forceStart(int id, int ticks, boolean repeat)
Used for timer events, wont throw an error if an timer with this id already exists and will overwrite it with this new oneboolean
has(int id)
void
reset(int id)
Resets the timer back to 0void
start(int id, int ticks, boolean repeat)
Used for timer events, will throw an error if a timer with the id is already startedboolean
stop(int id)
-
Method Details
-
start
void start(int id, int ticks, boolean repeat)Used for timer events, will throw an error if a timer with the id is already started- Parameters:
id
- The timers idticks
- After how many ticks the timer triggersrepeat
- Whether it resets the timer when done or deletes it
-
forceStart
void forceStart(int id, int ticks, boolean repeat)Used for timer events, wont throw an error if an timer with this id already exists and will overwrite it with this new one- Parameters:
id
- The timers idticks
- After how many ticks the timer triggersrepeat
- Whether it resets the timer when done or deletes it
-
has
boolean has(int id)- Returns:
- Returns true if a timer with this id is already active
-
stop
boolean stop(int id)- Returns:
- Returns false if there was no timer with the giver id
-
reset
void reset(int id)Resets the timer back to 0 -
clear
void clear()
-