mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-23 03:16:35 +00:00
Position: make World constructor parameter required
This commit is contained in:
parent
5e0d635562
commit
137605ab8c
@ -37,7 +37,7 @@ class Position extends Vector3{
|
|||||||
* @param float|int $y
|
* @param float|int $y
|
||||||
* @param float|int $z
|
* @param float|int $z
|
||||||
*/
|
*/
|
||||||
public function __construct($x, $y, $z, ?World $world = null){
|
public function __construct($x, $y, $z, ?World $world){
|
||||||
parent::__construct($x, $y, $z);
|
parent::__construct($x, $y, $z);
|
||||||
if($world !== null and $world->isClosed()){
|
if($world !== null and $world->isClosed()){
|
||||||
throw new \InvalidArgumentException("Specified world has been unloaded and cannot be used");
|
throw new \InvalidArgumentException("Specified world has been unloaded and cannot be used");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user