Interface ITimers


public interface ITimers
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    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
    boolean
    has(int id)
     
    void
    reset(int id)
    Resets the timer back to 0
    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
    boolean
    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 id
      ticks - After how many ticks the timer triggers
      repeat - 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 id
      ticks - After how many ticks the timer triggers
      repeat - 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()