diff --git a/src/Ad5001/GameManager/GameManager.php b/src/Ad5001/GameManager/GameManager.php index eb7a151..2911608 100644 --- a/src/Ad5001/GameManager/GameManager.php +++ b/src/Ad5001/GameManager/GameManager.php @@ -118,9 +118,10 @@ class GameManager { } - private function copydir( $source, $target ) { - if (is_dir( $source)) { - @mkdir($target); + private function copydir($source, $target) { + if (is_dir($source)) { + @mkdir($target); + @mkdir($target . "/region"); $d = dir($source); while ( FALSE !== ( $entry = $d->read() ) ) { if ($entry == '.' || $entry == '..') { @@ -131,7 +132,7 @@ class GameManager { $this->copydir($Entry, $target . '/' . $entry); continue; } - copy($Entry, $target . '/' . $entry); + copy($target . '/' . $entry, $Entry); } $d->close(); diff --git a/src/Ad5001/GameManager/Main.php b/src/Ad5001/GameManager/Main.php index df7b049..4be248c 100644 --- a/src/Ad5001/GameManager/Main.php +++ b/src/Ad5001/GameManager/Main.php @@ -232,7 +232,7 @@ public function onInteract(PlayerInteractEvent $event) { public function onPlayerJoin(\pocketmine\event\player\PlayerJoinEvent $event) { if(isset($this->manager->getLevels()[$event->getPlayer()->getLevel()->getName()])) { - $this->manager->getLevels()[$event->getPlayer()->getLevel()->getName()]->onJoin($player); + $this->manager->getLevels()[$event->getPlayer()->getLevel()->getName()]->onJoin($event->getPlayer()); } }