public function cancel() { if (!$this->isCancelled()) { $this->task->onCancel(); } $this->remove(); }
public function setUpdateInterval($interval) { $this->handler->cancel(); $this->handler = $this->getOwner()->getServer()->getScheduler()->scheduleRepeatingTask($this, $interval); }