mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 10:22:56 +00:00
Eradicate remaining usages of Position->getWorld()
This commit is contained in:
@ -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){
|
||||
|
Reference in New Issue
Block a user