"use client"; import { useEffect, useState } from "react"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { Badge } from "@/components/ui/badge"; import { Skeleton } from "@/components/ui/skeleton"; import { Map, ExternalLink, AlertCircle } from "lucide-react"; import { Button, buttonVariants } from "@/components/ui/button"; export default function MapPage() { const [bluemapUrl, setBluemapUrl] = useState(null); const [loading, setLoading] = useState(true); const [iframeLoaded, setIframeLoaded] = useState(false); const [iframeError, setIframeError] = useState(false); useEffect(() => { // Fetch BlueMap URL from server settings fetch("/api/server/settings") .then((r) => r.json()) .then((data) => { setBluemapUrl(data?.settings?.bluemapUrl ?? null); }) .catch(() => {}) .finally(() => setLoading(false)); }, []); if (loading) { return (
); } if (!bluemapUrl) { return (

3D World Map

Interactive BlueMap integration

BlueMap not configured

BlueMap is a 3D world map plugin for Minecraft servers. Configure its URL in Server Settings to embed it here.

Go to Server Settings
); } return (

3D World Map

Powered by BlueMap — live world view with player positions

BlueMap Open in new tab
{!iframeLoaded && !iframeError && (

Loading BlueMap...

)} {iframeError && (

Could not load BlueMap

Make sure BlueMap is running at{" "} {bluemapUrl}{" "} and that the URL is accessible from your browser.

)}