Skip to content

Position ​

class · pocketmine\world\Position · source

Extends pocketmine\math\Vector3

Properties ​

$world ​

php
public ?\pocketmine\world\World $world

Methods ​

__construct() ​

php
public function __construct(float|int $x, float|int $y, float|int $z, ?\pocketmine\world\World $world)

__toString() ​

php
public function __toString()

asPosition() ​

php
public function asPosition() : \pocketmine\world\Position

Return a Position instance

equals() ​

php
public function equals(\pocketmine\math\Vector3 $v) : bool

fromObject() ​

php
public static function fromObject(\pocketmine\math\Vector3 $pos, ?\pocketmine\world\World $world)

getSide() ​

php
public function getSide(int $side, int $step = 1)

Returns a side Vector

getWorld() ​

php
public function getWorld() : \pocketmine\world\World

Returns the position's world if valid. Throws an error if the world is unexpectedly invalid.

isValid() ​

php
public function isValid() : bool

Checks if this object has a valid reference to a loaded world

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.