Moving forward.
This commit is contained in:
parent
abbcbae8a7
commit
c913fd1580
2 changed files with 6 additions and 5 deletions
|
@ -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();
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue