Chunk: Rename unload() to onUnload()

this more accurately describes what the function does.
This commit is contained in:
Dylan K. Taylor 2018-01-02 10:49:06 +00:00
parent c3cc6f9880
commit c16c9efdf3
2 changed files with 3 additions and 3 deletions

View File

@ -2780,7 +2780,7 @@ class Level implements ChunkManager, Metadatable{
}
}
$chunk->unload();
$chunk->onUnload();
}catch(\Throwable $e){
$logger = $this->server->getLogger();
$logger->error($this->server->getLanguage()->translateString("pocketmine.level.chunkUnloadError", [$e->getMessage()]));

View File

@ -691,9 +691,9 @@ class Chunk{
}
/**
* Unloads the chunk, closing entities and tiles.
* Called when the chunk is unloaded, closing entities and tiles.
*/
public function unload() : void{
public function onUnload() : void{
foreach($this->getEntities() as $entity){
if($entity instanceof Player){
continue;