CommandCoordinates 5.46.0
Parses command coordinates like Bedrock: absolute numbers, relative ones (~, ~5, ~-2.5) and local ones (^left ^up ^forward, relative to the origin's rotation; all three coordinates must be local then).
Constants
MAX_COORD
php
public const MAX_COORD = 30000000MIN_COORD
php
public const MIN_COORD = -30000000Methods
isCoordinate()
php
public static function isCoordinate(string $arg) : boolWhether the argument is a coordinate: a number, or ~ / ^ optionally followed by a number.
parsePosition()
php
public static function parsePosition(\pocketmine\entity\Location $origin, string $x, string $y, string $z) : \pocketmine\math\Vector3Resolves x y z arguments. Relative coordinates are added to the origin's position; local coordinates are offsets left, up and forward from it, following its yaw and pitch. X and Z are limited to +-30000000, Y to the world height.
parseRotation()
php
public static function parseRotation(float $current, string $arg) : floatResolves a rotation argument (yRot or xRot): a number, or ~ / ~n relative to the current value.
