Skip to content

feat: allow passing an Auth to ExtensionBootstrap.init - #7

Merged
TheMeinerLP merged 1 commit into
mainfrom
feat/extension-bootstrap-auth
Aug 26, 2026
Merged

feat: allow passing an Auth to ExtensionBootstrap.init#7
TheMeinerLP merged 1 commit into
mainfrom
feat/extension-bootstrap-auth

Conversation

@TheMeinerLP

Copy link
Copy Markdown

Problem

Minestom binds the Auth to the ServerProcess inside MinecraftServer.init(Auth) and offers no way to swap it afterwards. ExtensionBootstrap.init() called the no-arg MinecraftServer.init(), which hardcodes Auth.Offline.

Consequence: a server started through this bootstrap could never enable Velocity modern forwarding — not before init() (the value is overwritten), not after (the process keeps the Auth it was built with).

Change

  • New ExtensionBootstrap.init(Auth) overload that hands the caller's Auth straight to MinecraftServer.init(Auth).
  • init() keeps its previous behaviour by delegating with Auth.Offline — no call site has to change.
  • ExtensionBootstrapAuthTest pins both directions, since nothing else links the bootstrap to the auth the process ends up with.

Verification

./gradlew build green across all modules.

Minestom binds the Auth to the ServerProcess in MinecraftServer.init(Auth)
and offers no way to swap it afterwards. ExtensionBootstrap.init() called
the no-arg MinecraftServer.init(), which hardcodes Auth.Offline - so a
server started through this bootstrap could never enable Velocity modern
forwarding at all.

The new init(Auth) overload hands the caller's Auth straight to
MinecraftServer.init(Auth); init() keeps its previous offline behaviour by
delegating to it with Auth.Offline.
@github-actions

Copy link
Copy Markdown

Test results

 21 files   21 suites   1m 57s ⏱️
 56 tests  56 ✅ 0 💤 0 ❌
168 runs  168 ✅ 0 💤 0 ❌

Results for commit 47414a2.

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.

1 participant