public boolean cancelQuestTimer(String name) { QuestTimer timer = removeQuestTimer(name); if (timer != null) { timer.stop(); } return timer != null; }
public void stopQuestTimers() { for (QuestTimer timer : getTimers().values()) { timer.setQuestState(null); timer.stop(); } _timers.clear(); }
/** * Add a timer to the quest.<br> * <br> * * @param name: name of the timer (also passed back as "event" in notifyEvent) * @param time: time in ms for when to fire the timer * @param npc: npc associated with this timer (can be null) */ public void startQuestTimer(String name, long time, NpcInstance npc) { QuestTimer timer = new QuestTimer(name, time, npc); timer.setQuestState(this); QuestTimer oldTimer = getTimers().put(name, timer); if (oldTimer != null) { oldTimer.stop(); } timer.start(); }