mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-12 21:05:12 +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){
|
}catch(\Throwable $e){
|
||||||
$logger = $this->server->getLogger();
|
$logger = $this->server->getLogger();
|
||||||
$logger->error($this->server->getLanguage()->translateString("pocketmine.level.chunkUnloadError", [$e->getMessage()]));
|
$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){
|
foreach($this->getEntities() as $entity){
|
||||||
if($entity instanceof Player){
|
if($entity instanceof Player){
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user