mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +00:00
Added chunk check on Level
This commit is contained in:
parent
2cec0d9f36
commit
767800662c
@ -1757,6 +1757,7 @@ class Level implements ChunkManager, Metadatable{
|
|||||||
unset($this->chunkGenerationQueue[Level::chunkHash($x, $z)]);
|
unset($this->chunkGenerationQueue[Level::chunkHash($x, $z)]);
|
||||||
$chunk->setProvider($this->provider);
|
$chunk->setProvider($this->provider);
|
||||||
$this->setChunk($x, $z, $chunk);
|
$this->setChunk($x, $z, $chunk);
|
||||||
|
$chunk = $this->getChunk($x, $z, false);
|
||||||
if($chunk !== null and ($oldChunk === null or $oldChunk->isPopulated() === false) and $chunk->isPopulated()){
|
if($chunk !== null and ($oldChunk === null or $oldChunk->isPopulated() === false) and $chunk->isPopulated()){
|
||||||
$this->server->getPluginManager()->callEvent(new ChunkPopulateEvent($chunk));
|
$this->server->getPluginManager()->callEvent(new ChunkPopulateEvent($chunk));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user