Eradicate remaining usages of Position->getWorld()

This commit is contained in:
Dylan K. Taylor
2020-06-29 21:03:55 +01:00
parent 43ae1a5cb4
commit fc22fd80d8
4 changed files with 5 additions and 5 deletions

View File

@ -713,7 +713,7 @@ class Player extends Human implements CommandSender, ChunkLoader, ChunkListener,
}
protected function switchWorld(World $targetWorld) : bool{
$oldWorld = $this->location->getWorld();
$oldWorld = $this->location->isValid() ? $this->location->getWorldNonNull() : null;
if(parent::switchWorld($targetWorld)){
if($oldWorld !== null){
foreach($this->usedChunks as $index => $status){