mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 16:24:05 +00:00
Position::fromObject() world parameter is now mandatory (although still nullable)
This commit is contained in:
parent
5cc2a9c3dd
commit
a05f67bc77
@ -43,7 +43,7 @@ class Location extends Position{
|
||||
/**
|
||||
* @return Location
|
||||
*/
|
||||
public static function fromObject(Vector3 $pos, ?World $world = null, float $yaw = 0.0, float $pitch = 0.0){
|
||||
public static function fromObject(Vector3 $pos, ?World $world, float $yaw = 0.0, float $pitch = 0.0){
|
||||
return new Location($pos->x, $pos->y, $pos->z, $yaw, $pitch, $world ?? (($pos instanceof Position) ? $pos->world : null));
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ class Position extends Vector3{
|
||||
/**
|
||||
* @return Position
|
||||
*/
|
||||
public static function fromObject(Vector3 $pos, ?World $world = null){
|
||||
public static function fromObject(Vector3 $pos, ?World $world){
|
||||
return new Position($pos->x, $pos->y, $pos->z, $world);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user