mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 08:44:01 +00:00
Chunk: Rename unload() to onUnload()
this more accurately describes what the function does.
This commit is contained in:
parent
c3cc6f9880
commit
c16c9efdf3
@ -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()]));
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user