Skip to content

Add auto-connect option to server config and settings GUI#165

Open
roepun wants to merge 4 commits intoCivPlatform:mainfrom
roepun:feature/auto-connect
Open

Add auto-connect option to server config and settings GUI#165
roepun wants to merge 4 commits intoCivPlatform:mainfrom
roepun:feature/auto-connect

Conversation

@roepun
Copy link
Copy Markdown

@roepun roepun commented Apr 28, 2026

Adds an auto-connect feature that automatically connects to the configured
MapSync server addresses when joining a Minecraft server.

Changes:

  • ServerConfig: adds autoConnect boolean field (false by default, persisted per server)
  • SyncConnections: adds hasNoConnections() helper method
  • GameContext: triggers auto-connect on AFTER_CLIENT_WORLD_CHANGE, guarded by
    hasNoConnections() to avoid re-triggering on dimension changes.
    Note: INIT and JOIN were considered but proved unreliable on quick reconnects,
    as auth/session state is not always ready in time.
  • SyncConnectionsGui: adds Auto-connect checkbox to the settings GUI

Mod version not bumped, so that there aren't any version conflicts with the MapSync server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants