Package noppes.npcs.api
Interface ITimers
public interface ITimers
-
Method Summary
Modifier and TypeMethodDescriptionvoidclear()voidforceStart(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 onebooleanhas(int id) voidreset(int id) Resets the timer back to 0voidstart(int id, int ticks, boolean repeat) Used for timer events, will throw an error if a timer with the id is already startedbooleanstop(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()
-