/** * In order to pass data to a DataStore * a key is needed. Typically one should * use $warp->getName() * @param Warp $warp * @return array */ protected function warpToData(Warp $warp) { if ($warp->getDestination()->isInternal()) { //TODO implement yaw and pitch $pos = $warp->getDestination()->getPosition(); return ["x" => $pos->getX(), "y" => $pos->getY(), "z" => $pos->getZ(), "level" => $pos instanceof WeakPosition ? $pos->getLevelName() : $pos->getLevel()->getName(), "public" => $warp->isPublic()]; } return ["address" => $warp->getDestination()->getAddress(), "port" => $warp->getDestination()->getPort(), "public" => $warp->isPublic()]; }