public function onDisable() { $this->save(); if ($this->db instanceof Database) { $this->db->close(); } }
public function onDisable() { $now = time(); foreach ($this->expire as $landId => $time) { $this->expire[$landId][0] -= $now - $time[1]; } file_put_contents($this->getDataFolder() . "Expire.dat", serialize($this->expire)); if ($this->db instanceof Database) { $this->db->close(); } }