getProvider() final public method

final public getProvider ( ) : pocketmine\level\format\LevelProvider
return pocketmine\level\format\LevelProvider
示例#1
0
 private function loadCfg(Level $lv)
 {
     $world = $lv->getName();
     $f = $lv->getProvider()->getPath() . "itemcasepe.txt";
     $this->cases[$world] = [];
     if (!file_exists($f)) {
         return;
     }
     foreach (explode("\n", file_get_contents($f)) as $ln) {
         if (preg_match('/^\\s*#/', $ln)) {
             continue;
         }
         if (($ln = trim($ln)) == "") {
             continue;
         }
         $v = explode(",", $ln);
         if (count($v) < 3) {
             continue;
         }
         $this->cases[$world][$v[0]] = ["item" => $v[1], "count" => $v[2]];
     }
 }