public function __construct(iZone $plugin) { $this->plugin = $plugin; if (!file_exists($plugin->getDataFolder() . "Database.db")) { $this->database = new \SQLite3($plugin->getDataFolder() . "Database.db", SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE); $resource = $this->plugin->getResource("sqlite3.sql"); $this->database->exec(stream_get_contents($resource)); fclose($resource); } else { $this->database = new \SQLite3($plugin->getDataFolder() . "Database.db", SQLITE3_OPEN_READWRITE); } }
public function __construct(iZone $plugin) { $this->_plugin = $plugin; $this->zonesConfig = new Config($plugin->getDataFolder() . "zones.yml", Config::YAML); $this->permConfig = new Config($plugin->getDataFolder() . "permissions.yml", Config::YAML); }