mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-20 16:00:20 +00:00
Better chunk unload queues
This commit is contained in:
parent
91b2f81f3c
commit
4a072b4163
@ -350,6 +350,7 @@ class Level implements ChunkManager, Metadatable{
|
||||
*/
|
||||
public function freeChunk($X, $Z, Player $player){
|
||||
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){
|
||||
Level::getXZ($i, $X, $Z);
|
||||
if(!$this->isSpawnChunk($X, $Z)){
|
||||
$this->unloadChunkRequest($X, $Z, true);
|
||||
$this->unloadChunk($X, $Z, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user