Hello, I am working on a skywars plugin, I need at the end of the game to replace the map by a new one. I tried to use copy() but apparently it's only for files. Thank you for your help.
I found : Code: $zip->open($this->getServer()->getDataPath()."zipworld/worldName.".zip"); $zip->extractTo($this->getServer()->getDataPath()."worlds/".$worldName."/"); $zip->close(); In the main folder (with "players", "worlds"...) create a folder name zipworlds and put a zip version of the world. Then just replace with the worldName. The only problem is I can't unload world (crash..) if you can help : http://forums.pocketmine.net/threads/level-unload-cause-crash.7407/ Thanks
Using ZIP is actually not performance optimized. Try referring to the file functions in the LegionPE plugin here: http://pastebin.com/g8YcuaBj