Skip to content

fix startup crash when auto-enabling plugin-provided datapacks - #14238

Open
wiselder wants to merge 1 commit into
PaperMC:mainfrom
wiselder:bugs/fix-datapack-discovery-npe
Open

wiselder wants to merge 1 commit into
PaperMC:mainfrom
wiselder:bugs/fix-datapack-discovery-npe

Conversation

@wiselder

@wiselder wiselder commented Sep 8, 2026

Copy link
Copy Markdown

It checks the identifiers of the selected packs, rather than comparing the pack objects when selecting them again.

This allows you to avoid converting Adventure pack names before the Minecraft registries become available, which could lead to a NullPointerException when starting the server.

crash log

Local testing:

  1. Paper 26.2
  2. One Paper plugin with Bootstrap and a built-in datapack.
  3. Register it twice in DATAPACK_DISCOVERY under different identifiers and specify autoEnableOnServerStart(true) for both.
  4. Start the server in an existing world.
    Result: NPE in AdventureComponent.equals() -> PackRepository.rebuildSelected(), the server does not start.
    The error was not reproduced when autoEnableOnServerStart(false).

@wiselder
wiselder requested a review from a team as a code owner September 8, 2026 16:05
@github-project-automation github-project-automation Bot moved this to Awaiting review in Paper PR Queue Sep 8, 2026
@EggAllocationService

Copy link
Copy Markdown

+1, this issue is causing problems for me as it can also occur when two different plugins load their own built in datapacks during bootstrap.

@papermc-projects papermc-projects Bot moved this from Awaiting review to Full approval in Paper PR Queue Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Full approval

Development

Successfully merging this pull request may close these issues.

3 participants