mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-16 02:38:54 +00:00
Fixed Level not saving chunks on unload
This commit is contained in:
parent
e0dda934ec
commit
557618c87d
@ -1567,6 +1567,9 @@ class Level implements ChunkManager, Metadatable{
|
|||||||
if(count($this->unloadQueue) > 0){
|
if(count($this->unloadQueue) > 0){
|
||||||
foreach($this->unloadQueue as $index => $chunk){
|
foreach($this->unloadQueue as $index => $chunk){
|
||||||
|
|
||||||
|
if($this->autoSave){
|
||||||
|
$this->provider->saveChunk($chunk->getX(), $chunk->getZ());
|
||||||
|
}
|
||||||
//If the chunk can't be unloaded, it stays on the queue
|
//If the chunk can't be unloaded, it stays on the queue
|
||||||
if($this->unloadChunk($chunk->getX(), $chunk->getZ(), true)){
|
if($this->unloadChunk($chunk->getX(), $chunk->getZ(), true)){
|
||||||
unset($this->unloadQueue[$index]);
|
unset($this->unloadQueue[$index]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user