Moving forward.

This commit is contained in:
Ad5001 2016-08-04 13:53:57 +03:00
parent abbcbae8a7
commit c913fd1580
2 changed files with 6 additions and 5 deletions

View file

@ -121,6 +121,7 @@ class GameManager {
private function copydir($source, $target) { private function copydir($source, $target) {
if (is_dir($source)) { if (is_dir($source)) {
@mkdir($target); @mkdir($target);
@mkdir($target . "/region");
$d = dir($source); $d = dir($source);
while ( FALSE !== ( $entry = $d->read() ) ) { while ( FALSE !== ( $entry = $d->read() ) ) {
if ($entry == '.' || $entry == '..') { if ($entry == '.' || $entry == '..') {
@ -131,7 +132,7 @@ class GameManager {
$this->copydir($Entry, $target . '/' . $entry); $this->copydir($Entry, $target . '/' . $entry);
continue; continue;
} }
copy($Entry, $target . '/' . $entry); copy($target . '/' . $entry, $Entry);
} }
$d->close(); $d->close();

View file

@ -232,7 +232,7 @@ public function onInteract(PlayerInteractEvent $event) {
public function onPlayerJoin(\pocketmine\event\player\PlayerJoinEvent $event) { public function onPlayerJoin(\pocketmine\event\player\PlayerJoinEvent $event) {
if(isset($this->manager->getLevels()[$event->getPlayer()->getLevel()->getName()])) { 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());
} }
} }