Hello, When I want to reset a world, I have this error : Code: ClassNotFoundException: "Class ZipArchive not found" (EXCEPTION) in "/src/spl/BaseClassLoader" at line 144 Here is my code : PHP: public function resetWorld(){ $name = self::WORLD; $this->getServer()->unloadLevel($this->getServer()->getLevelByName($name)); $zip = new \ZipArchive; $zip->open($this->getServer()->getDataFolder()."Map/".$name.".zip"); $zip->extractTo($this->getServer()->getDataPath()."worlds"); $zip->close(); unset($zip); $this->getServer()->loadLevel(self::WORLD); } Here is a tree of my plugins folder : Code: \---plugins | | +---world | | TeamLives.zip | | | | ... Thank you
You should use the PHP binaries distributed by the PMMP team. Avoid using custom binaries (e.g. via aptitude) or binaries from other spoons.
PHP: $level = $this->getServer()->getLevelByName("yourworld"); $this->getServer()->unloadLevel($level); $zip = new \ZipArchive; $zip->open($this->getServer()->getDataPath()."yourfolder/yourworld.zip"); $zip->extractTo($this->getServer()->getDataPath()."worlds/yourworld/"); $zip->close();
The code is good, please stop with your "read oop", TutoGamerWalid is a good PHP Dev. Ps: the code is not wrong
I don't see what you have changed apart from changing some string literals and delete a few probably-useless-probably-useful lines. This post doesn't answer the question at all.