Exemplo n.º 1
0
 public function __construct(Main $tntRun)
 {
     $this->tntRun = $tntRun;
     $this->tntRun->saveResource("messages.yml");
     $this->messages = new Config($this->tntRun->getDataFolder() . "messages.yml", Config::YAML);
     $this->tag = $this->messages->get("prefix");
 }
Exemplo n.º 2
0
 public function __construct(Main $tntRun)
 {
     $this->tntRun = $tntRun;
     if (file_exists($tntRun->getDataFolder() . "stats.db")) {
         $this->db = new \SQLite3($tntRun->getDataFolder() . "stats.db", SQLITE3_OPEN_READWRITE);
     } else {
         $this->db = new \SQLite3($tntRun->getDataFolder() . "stats.db", SQLITE3_OPEN_CREATE | SQLITE3_OPEN_READWRITE);
     }
     $this->db->exec("CREATE TABLE IF NOT EXISTS tntstats (name TEXT PRIMARY KEY, matches INTEGER, wins INTEGER)");
 }
Exemplo n.º 3
0
 public function __construct(Main $tntRun)
 {
     $this->signs = new Config($tntRun->getDataFolder() . "/resources/signs.yml", Config::YAML);
     $this->reload();
 }