PaperMC / PaperMC/Paper

DialogBody + ItemStack as item crashes server

Open
#13,555 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

status: accepted version: 1.21.11
Dominant language
Java
Stars
12.7k
Forks
3.5k
Avg merge
3d 13h
Merged PRs (30d)
11

Description

Stack trace

https://pastes.dev/PgMViG4EXH

Plugin and Datapack List

[16:44:53 INFO]: ℹ Server Plugins (1):
[16:44:53 INFO]: Paper Plugins:
[16:44:53 INFO]: - VanillaPlus

[16:44:30 INFO]: There are 3 data pack(s) enabled: [vanilla (built-in)], [file/bukkit (world)], [paper (built-in)]
[16:44:30 INFO]: There are no more data packs available

Actions to reproduce (if known)
@Override
    public void bootstrap(BootstrapContext context) {
        context.getLifecycleManager().registerEventHandler(RegistryEvents.DIALOG.compose()
            .newHandler(event -> event.registry().register(
                DialogKeys.create(Key.key("papermc:custom_dialog")),
                builder -> builder
                    .base(DialogBase
                        .builder(Component.text("Title"))
                        .body(DialogBody.item(ItemStack.of(Material.PAPER).setData(DataComponentTypes.CUSTOM_NAME, Component.text("TEST"))))
                        .build())
                    .type(DialogType.notice())
            )));
    }
Paper version

[16:44:19 INFO]: Checking version, please wait...
[16:44:19 INFO]: This server is running Paper version 1.21.11-92-main@e7445e1 (2026-01-11T23:38:04Z) (Implementing API version 1.21.11-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.11-46-8e5e54f (MC: 1.21.11)

Other

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked stack trace and the bootstrap reproduction using DialogBody.item with an ItemStack carrying a custom name. Trace the dialog registration and item serialization path to identify the crash; done means this dialog registers without crashing the server, with a regression test if the relevant test area is found.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.