mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-03 16:49:53 +00:00
Position: use setLevel() in constructor to validate level
This commit is contained in:
parent
e4b6a18404
commit
5eb1ee3416
@ -39,7 +39,7 @@ class Position extends Vector3{
|
|||||||
*/
|
*/
|
||||||
public function __construct($x = 0, $y = 0, $z = 0, Level $level = null){
|
public function __construct($x = 0, $y = 0, $z = 0, Level $level = null){
|
||||||
parent::__construct($x, $y, $z);
|
parent::__construct($x, $y, $z);
|
||||||
$this->level = $level;
|
$this->setLevel($level);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function fromObject(Vector3 $pos, Level $level = null){
|
public static function fromObject(Vector3 $pos, Level $level = null){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user