Men, i know how to cancel a task, but i want to cancel a task registered for a player when they left the server............
Do you want to identify whether the player is online in the onRun function, and cancel if it is offline. PHP: public function onRun($tick) { if (!$this->player->isOnline()) { // On offline! $this->getOwner()->getServer()->getScheduler()->cancelTask($this->getTaskId()); }else { // something }}