Modernize Position and Location

[bc break]
This commit is contained in:
Dylan K. Taylor
2022-06-01 21:21:31 +01:00
parent 7b8eeb42f6
commit 2bb99fa677
2 changed files with 4 additions and 13 deletions

View File

@ -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");