diff --git a/src/pocketmine/level/Location.php b/src/pocketmine/level/Location.php index e1dfb4488..64e8ec32f 100644 --- a/src/pocketmine/level/Location.php +++ b/src/pocketmine/level/Location.php @@ -51,4 +51,7 @@ class Location extends Position{ return $this->pitch; } + public function __toString(){ + return return "Location(level=" . ($this->isValid() ? $this->getLevel()->getName() : "null") . ",x=$this->x,y=$this->y,z=$this->z,yaw=$this->yaw,pitch=$this->pitch)"; + } }