Esempio n. 1
0
 /**
  * Create a default setting
  *
  * @param string $userName        	
  */
 public function loadAttribute($userName)
 {
     $userName = strtolower($userName);
     $alpha = substr($userName, 0, 1);
     if (isset($this->users[$userName])) {
         return $this->users[$userName];
     }
     if (!file_exists($this->plugin->getDataFolder() . "player/")) {
         @mkdir($this->plugin->getDataFolder() . "player/");
     }
     return $this->users[$userName] = new AttributeData($userName, $this->plugin->getDataFolder() . "player/");
 }
Esempio n. 2
0
 public function save($async = false)
 {
     (new Config($this->plugin->getDataFolder() . "pluginDB.yml", Config::YAML, $this->db))->save($async);
 }