pocketmine\plugin\PluginBase::getDataFolder PHP Method

getDataFolder() final public method

final public getDataFolder ( )
    public final function getDataFolder()
    {
        return $this->dataFolder;
    }

Usage Example

Ejemplo n.º 1
0
 public function __construct(PluginBase $owner)
 {
     $path = $owner->getDataFolder() . "stats.sqlite3";
     $this->database = new \SQLite3($path);
     $sql = "CREATE TABLE IF NOT EXISTS Scores (\n\t\t\tplayer TEXT NOT NULL,\n\t\t\ttype TEXT NOT NULL,\n\t\t\tcount INTEGER NOT NULL,\n\t\t\tPRIMARY KEY (player,type)\n\t\t)";
     $this->database->exec($sql);
 }
All Usage Examples Of pocketmine\plugin\PluginBase::getDataFolder