mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Merge remote-tracking branch 'origin/stable' into staging/4.1
This commit is contained in:
@ -153,16 +153,18 @@ class WorldManager{
|
||||
}
|
||||
|
||||
$this->server->getLogger()->info($this->server->getLanguage()->translate(KnownTranslationFactory::pocketmine_level_unloading($world->getDisplayName())));
|
||||
try{
|
||||
$safeSpawn = $this->defaultWorld !== null ? $this->defaultWorld->getSafeSpawn() : null;
|
||||
}catch(WorldException $e){
|
||||
$safeSpawn = null;
|
||||
}
|
||||
foreach($world->getPlayers() as $player){
|
||||
if($world === $this->defaultWorld || $safeSpawn === null){
|
||||
$player->disconnect("Forced default world unload");
|
||||
}else{
|
||||
$player->teleport($safeSpawn);
|
||||
if(count($world->getPlayers()) !== 0){
|
||||
try{
|
||||
$safeSpawn = $this->defaultWorld !== null && $this->defaultWorld !== $world ? $this->defaultWorld->getSafeSpawn() : null;
|
||||
}catch(WorldException $e){
|
||||
$safeSpawn = null;
|
||||
}
|
||||
foreach($world->getPlayers() as $player){
|
||||
if($safeSpawn === null){
|
||||
$player->disconnect("Forced default world unload");
|
||||
}else{
|
||||
$player->teleport($safeSpawn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -263,6 +263,7 @@ class LevelDB extends BaseWorldProvider implements WritableWorldProvider{
|
||||
case 11: //MCPE 1.11.0.1 beta (???)
|
||||
case 10: //MCPE 1.9 (???)
|
||||
case 9: //MCPE 1.8 (???)
|
||||
case 8: //MCPE 1.2.13 (paletted subchunks)
|
||||
case 7: //MCPE 1.2 (???)
|
||||
case 6: //MCPE 1.2.0.2 beta (???)
|
||||
case 4: //MCPE 1.1
|
||||
|
Reference in New Issue
Block a user