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]]; } }