diff --git a/src/entity/Location.php b/src/entity/Location.php index 2ebbb2661..53ccf91f2 100644 --- a/src/entity/Location.php +++ b/src/entity/Location.php @@ -29,10 +29,8 @@ use pocketmine\world\World; class Location extends Position{ - /** @var float */ - public $yaw; - /** @var float */ - public $pitch; + public float $yaw; + public float $pitch; public function __construct(float $x, float $y, float $z, ?World $world, float $yaw, float $pitch){ $this->yaw = $yaw; diff --git a/src/world/Position.php b/src/world/Position.php index 5339adbec..b7775e53d 100644 --- a/src/world/Position.php +++ b/src/world/Position.php @@ -28,16 +28,9 @@ use pocketmine\utils\AssumptionFailedError; use function assert; class Position extends Vector3{ + public ?World $world = null; - /** @var World|null */ - public $world = null; - - /** - * @param float|int $x - * @param float|int $y - * @param float|int $z - */ - public function __construct($x, $y, $z, ?World $world){ + public function __construct(float|int $x, float|int $y, float|int $z, ?World $world){ parent::__construct($x, $y, $z); if($world !== null && !$world->isLoaded()){ throw new \InvalidArgumentException("Specified world has been unloaded and cannot be used");