diff --git a/src/player/Player.php b/src/player/Player.php index 90708a8f6..84cea684b 100644 --- a/src/player/Player.php +++ b/src/player/Player.php @@ -709,7 +709,7 @@ class Player extends Human implements CommandSender, ChunkLoader, ChunkListener, } protected function switchWorld(World $targetWorld) : bool{ - $oldWorld = $this->getWorld(); + $oldWorld = $this->location->getWorld(); if(parent::switchWorld($targetWorld)){ if($oldWorld !== null){ foreach($this->usedChunks as $index => $d){