/** * Create a warp or override its position * * @param string $warp * @param Position $pos * @param int $yaw * @param int $pitch * @return bool */ public function setWarp($warp, Position $pos, $yaw = 0, $pitch = 0) { if (!$this->validateName($warp, false)) { return false; } if ($pos instanceof Location) { $yaw = $pos->getYaw(); $pitch = $pos->getPitch(); } $this->warps[$warp] = new BaseLocation($warp, $pos->getX(), $pos->getY(), $pos->getZ(), $pos->getLevel(), $yaw, $pitch); return true; }