Skip to content

fix(spawn): clear game server resource packs on join - #361

Merged
TheMeinerLP merged 2 commits into
mainfrom
fix/clear-foreign-resource-packs
Oct 17, 2026
Merged

TheMeinerLP merged 2 commits into
mainfrom
fix/clear-foreign-resource-packs

Conversation

@TheMeinerLP

Copy link
Copy Markdown
Contributor

What players saw

After leaving a game server such as Cygnus (kick, or switching themselves with /hub), the game's required resource pack stayed applied in the lobby.

Cause

Game servers push a required pack. The pop on kick cannot cover a player-initiated proxy switch: that closes the game server's connection without a chance to send anything, and the pop is unreliable through the proxy anyway.

Fix

The lobby cleans up. ResourcePackClearListener calls player.clearResourcePacks() (a ResourcePackPopPacket without id, i.e. remove all) in AsyncPlayerConfigurationEvent, registered by the spawn column. The configuration phase is used because the client reloads resources there anyway, and in Minestom 2026.08.28-26.2 ResourcePackPopPacket implements ServerPacket.Configuration, so it is valid in that state. Titan pushes no resource pack of its own (no ResourcePack usage in the code).

Note: this would also remove a pack pushed by the proxy itself. I found no hint of one in this repo; worth checking the proxy/infra config.

Tests

  • ResourcePackClearListenerTest: a configuring player receives a ResourcePackPopPacket with a null id; after SpawnModule.stop() none is sent. Red before the wiring, green after.
  • ./gradlew build is green (spotless included); :features:spawn:test ran 38 tests, 0 failures.

@TheMeinerLP
TheMeinerLP requested a review from a team as a code owner October 4, 2026 13:55
@github-actions

github-actions Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Test results

  939 files    939 suites   1h 2m 25s ⏱️
2 526 tests 2 524 ✅  2 💤 0 ❌
7 606 runs  7 523 ✅ 83 💤 0 ❌

Results for commit dcef1ba.

♻️ This comment has been updated with latest results.

@TheMeinerLP
TheMeinerLP force-pushed the fix/clear-foreign-resource-packs branch from baa7a63 to dcef1ba Compare October 17, 2026 16:28
@TheMeinerLP
TheMeinerLP merged commit ab0bc73 into main Oct 17, 2026
7 checks passed
@TheMeinerLP
TheMeinerLP deleted the fix/clear-foreign-resource-packs branch October 17, 2026 16:45
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