mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 08:44:01 +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){
|
||||
parent::__construct($x, $y, $z);
|
||||
$this->level = $level;
|
||||
$this->setLevel($level);
|
||||
}
|
||||
|
||||
public static function fromObject(Vector3 $pos, Level $level = null){
|
||||
|
Loading…
x
Reference in New Issue
Block a user