Class EffectTracker

java.lang.Object
privbot.effects.EffectTracker

public final class EffectTracker extends Object
Per-plugin effect bookkeeping. Events and reads are bounded memory operations; there are no client reads, global subscriptions, threads, disk writes, or gameplay actions here.

Retain one tracker across worker Stop/Start and disconnects so captured pre-pot evidence is not lost. Time continues to pass while paused. Construct a fresh tracker for a new plugin lifetime. Currently only Elorin has an audited message policy; other profiles report UNKNOWN for the built-in effects and do not consume Elorin-looking chat.

  • Field Details

  • Method Details

    • startTimer

      public EffectTracker.TimerView startTimer(String name, long durationMs)
      Explicit local timer helper, not evidence of server acceptance. Named timers work on every profile, but starting one cannot make an unsupported built-in effect observable.
    • getTimer

      public EffectTracker.TimerView getTimer(String name)
      Live local timer view; use observe() when an immutable effect snapshot is required.
    • getTimerRemaining

      public long getTimerRemaining(String name)
      Source-compatible local timer helper: absent timer means zero, not proven inactive effect.
    • isTimerActive

      public boolean isTimerActive(String name)
      Source-compatible local timer helper; UNKNOWN effects require observe(), not this boolean.
    • clearTimer

      public void clearTimer(String name)
    • clearAll

      public void clearAll()
      Clears local bookkeeping without asserting that any in-game effect ended.
    • observe

      public EffectObservation observe(String name)
    • onGameMessage

      public void onGameMessage(net.runelite.api.ChatMessageType type, String message)
      Bounded chat capture, including Elorin's flask and death messages.