Added chunk check on Level

This commit is contained in:
Shoghi Cervantes 2014-12-30 15:54:12 +01:00
parent 2cec0d9f36
commit 767800662c
No known key found for this signature in database
GPG Key ID: 78464DB0A7837F89

View File

@ -1757,6 +1757,7 @@ class Level implements ChunkManager, Metadatable{
unset($this->chunkGenerationQueue[Level::chunkHash($x, $z)]);
$chunk->setProvider($this->provider);
$this->setChunk($x, $z, $chunk);
$chunk = $this->getChunk($x, $z, false);
if($chunk !== null and ($oldChunk === null or $oldChunk->isPopulated() === false) and $chunk->isPopulated()){
$this->server->getPluginManager()->callEvent(new ChunkPopulateEvent($chunk));
}