MCSync is a desktop app (C# .NET 8 + WinForms) for rotating the host of a Minecraft Java world among friends using a single-writer + lease model.
Eliminates the manual process of "send me the world as a ZIP" every time the host changes.
MCSync automatically coordinates:
- who can host at any given moment,
- when to download the latest consistent version,
- when to upload the new snapshot after finishing.
flowchart TD
UI[Dashboard / Tray] --> ORCH[SyncOrchestrator]
ORCH --> STATE[IStateStore]
ORCH --> WORLD[WorldManager]
ORCH --> SERVER[ServerManager]
ORCH --> TUNNEL[TunnelManager]
ORCH --> SNAP[ISnapshotStorageProvider]
STATE --> GHSTATE[GitHub state.json]
SNAP --> GHSNAP[GitHub snapshots]
SERVER --> JAVA[java + server.jar]
TUNNEL --> PLAYIT[playit-cli]
- Windows.
.NET 8 SDK(if running from source code).Javainstalled and accessible.server.jaravailable locally (downloaded from the official Minecraft page).playitinstalled and accessible in PATH (downloaded from the official playit.gg page — must be the.msiinstaller).- Private GitHub repository for
state.jsonand snapshots. - GitHub token with read/write permissions to the repo.
- Clone the repository.
- Build:
dotnet build --nologo- Run:
dotnet run --project .\MCSync.csproj- Open SETTINGS and fill in at minimum:
- GitHub owner / repo / branch / token
- path to
server.jar playit.ggURL- minimum and maximum Java memory
- Save the configuration.
- Press START HOST.
- The app validates the remote lease.
- If there is a newer remote snapshot, it downloads it.
- Prepares the server folder and starts
server.jar. - Starts the tunnel and publishes the endpoint.
- Press STOP HOST AND SYNC.
- Marks the remote state as
Transferring. - Stops the server and tunnel.
- Compresses the world, calculates the checksum, and uploads the snapshot.
- Publishes the new version and releases the lease.
sequenceDiagram
participant U as User
participant UI as Dashboard/Tray
participant O as SyncOrchestrator
participant S as GitHubStateStore
participant W as WorldManager
participant M as ServerManager
participant T as TunnelManager
participant P as SnapshotProvider
U->>UI: Start host
UI->>O: StartHostingAsync
O->>S: TryAcquireLease
S-->>O: Lease OK
O->>W: SyncDownIfRequired
O->>M: StartAsync
O->>T: StartAsync
O->>S: UpdateTunnelAddress + Heartbeat
O-->>UI: Hosting
U->>UI: Stop host
UI->>O: StopHostingAsync
O->>S: MarkTransferring
O->>M: StopGracefullyAsync
O->>T: StopAsync
O->>W: CreateSnapshotAsync
O->>P: UploadSnapshotAsync
O->>S: PublishSnapshot
O-->>UI: Idle
The app is in phase 1 (functional demo): end-to-end operable flow, UI for daily use, and local logging.
src/Core/README.md: orchestration, states, and consistency.src/GitHub/README.md: control plane and lease semantics.src/Minecraft/README.md: local server and snapshot lifecycle.src/Storage/README.md: snapshot abstraction and provider.src/Tunnel/README.md:playit-clilifecycle.