mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-20 07:39:42 +00:00
World: change 'closed' to 'unloaded'
this makes more sense overall from a reader's perspective. and also provide a rug-jerk for any idiots using World->close() when they aren't supposed to? ....
This commit is contained in:
@@ -168,7 +168,7 @@ class WorldManager{
|
||||
}
|
||||
unset($this->worlds[$world->getId()]);
|
||||
|
||||
$world->close();
|
||||
$world->onUnload();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -321,7 +321,7 @@ class WorldManager{
|
||||
*/
|
||||
public function findEntity(int $entityId) : ?Entity{
|
||||
foreach($this->worlds as $world){
|
||||
assert(!$world->isClosed());
|
||||
assert($world->isLoaded());
|
||||
if(($entity = $world->getEntity($entityId)) instanceof Entity){
|
||||
return $entity;
|
||||
}
|
||||
|
Reference in New Issue
Block a user