IntellectualSites / IntellectualSites/PlotSquared

NullPointerException when encoding 'clientbound/minecraft:set_title_text' packet (component is null) on Paper 26.2

Open
#4,922 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Requires Testing
Dominant language
Java
Stars
653
Forks
975
Avg merge
2m
Merged PRs (30d)
6

Description

Server Implementation

Paper

Server Version

26.2

Describe the bug

After updating PlotSquared to the latest build for Paper 26.2, the console throws an EncoderException whenever PlotSquared tries to send a title to a player (e.g. when entering a plot).

The packet 'clientbound/minecraft:set_title_text' fails to encode because the Component passed to it is null:

java.lang.NullPointerException: Cannot invoke "net.minecraft.network.chat.Component.tryCollapseToString()" because "component" is null

It looks like PlotSquared passes a null Component to the title packet instead of an empty Component (Component.empty()). Older Paper builds tolerated this, but the current build no longer accepts null components.

To Reproduce
  1. Run a Paper 26.2 server (build 26.2-112) with the latest PlotSquared v7 build.
  2. Join the server and enter/leave a plot, so that PlotSquared sends a plot title.
  3. Check the console: "Error sending packet clientbound/minecraft:set_title_text" with a NullPointerException is logged.
Expected behaviour

PlotSquared should never pass a null Component to the title packet. It should either send a valid (empty) Component or skip sending the packet entirely. No exception should be logged, and the title should display normally (or nothing should be shown if the title text is empty/disabled).

Screenshots / Videos

No response

Error log (if applicable)

https://gist.github.com/BerndPixel/57cb4ab465116bcc1b68ad0c0ff3e0cc

Plot Debugpaste

i dont get any message in Chat

PlotSquared Version

7.6.2

Checklist
Anything else?

Other plugins with packet injectors are installed (TAB, ProtocolLib, NoChatReports, AxGraves), but according to the stack trace they only pass the packet through their Netty pipeline - the null component originates from PlotSquared itself.

Current workaround: disabling titles in the PlotSquared config stops the error.

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 by reproducing the title flow on Paper 26.2 with PlotSquared 7.6.2, focusing on the clientbound/minecraft:set_title_text packet and the title configuration path. Trace where PlotSquared creates or sends the Component, then verify that an empty title sends a valid empty Component or skips the packet. Confirm the console error is gone and normal titles still display.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.