PaperMC / PaperMC/Velocity

Make TabListEntry have nullable fields

Open
#1,315 10 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
2.3k
Forks
959
Avg merge
5d 10h
Merged PRs (30d)
2

Description

The way addEntry() works, it only sends the appropriate update packet if the fields have changed.

But there is no way to specify you dont want a field to change, if you do TabListEntry.builder() for example, and dont specify gamemode, it defaults to 0, which you'd think means do nothing, but it sends an update packet to set them to survival (gamemode 0),

if it defaulted to null and did no operation it'd be nice as, in my velocity tab list plugin, spectators can't go through walls, since when the tab list updates it sends gamemode 0, and we cant explicitly specify it because on the proxy we don't know what gamemode they should be.

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 locating TabListEntry.builder() and addEntry(), focusing on how unspecified fields are represented and how update packets are selected. Done means an omitted field can remain unchanged rather than being sent as gamemode 0, with tests covering the builder and update behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.