mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-03 08:35:20 +00:00
Better chunk unload queues
This commit is contained in:
@ -350,6 +350,7 @@ class Level implements ChunkManager, Metadatable{
|
|||||||
*/
|
*/
|
||||||
public function freeChunk($X, $Z, Player $player){
|
public function freeChunk($X, $Z, Player $player){
|
||||||
unset($this->usedChunks[Level::chunkHash($X, $Z)][$player->getID()]);
|
unset($this->usedChunks[Level::chunkHash($X, $Z)][$player->getID()]);
|
||||||
|
$this->unloadChunkRequest($X, $Z, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1697,10 +1698,11 @@ class Level implements ChunkManager, Metadatable{
|
|||||||
if(count($c) === 0){
|
if(count($c) === 0){
|
||||||
Level::getXZ($i, $X, $Z);
|
Level::getXZ($i, $X, $Z);
|
||||||
if(!$this->isSpawnChunk($X, $Z)){
|
if(!$this->isSpawnChunk($X, $Z)){
|
||||||
$this->unloadChunkRequest($X, $Z, true);
|
$this->unloadChunk($X, $Z, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user