Catchable fatal error: Object of class pocketmine\level\Level could not be converted to string in /h ome/UHC/plugins/UHC/src/UHC/Main.php on line 644 I dont know how i Remedy PHP: [642] $level = $this->plugin->getServer()->getLevelByName($arena); [643] if($level instanceof Level){ [644] $this->plugin->getServer()->unloadLevel($level); [645] if(is_dir("worlds/".$level)){ [646] rmdir($level); }
Change this: PHP: if(is_dir("worlds/".$level)){ to this: PHP: if(is_dir("worlds/".$level->getFolderName())){
The php docs state that "The directory must be empty, and the relevant permissions must permit this." , and of course a world directory is not empty... So you might want to delete the files inside of it first. Also you need to do what @jasonwynn10 stated above.
What @jasonwynn10 stated has nothing to do with what you said, does it? See http://stackoverflow.com/documentat...files-and-directories#t=201703051625368772849 for deleting directories... (Because I wrote it)