Skip to content

Conversation

@HarryProgramming00
Copy link

@HarryProgramming00 HarryProgramming00 commented Dec 22, 2025

📋 Description

Please include a summary of the changes and the related issue(s).
What is this PR solving? Why is it needed?

FancyPlugins Issue #164 (tab list showing for older clients)

#164

This PR fixes an issue where players using Minecraft versions prior to 1.20.5 would see the literal text "" displayed in the tab list for NPCs that were intended to have no visible name. Older clients do not interpret the placeholder string as an empty display name and instead render it literally.

The fix replaces the "" value with an empty Adventure Component, ensuring that NPC names are hidden consistently across all supported client versions.

✅ Checklist

  • [ X] My code follows the project's coding style and guidelines
  • [ X] I have tested my changes locally and they work as expected
  • [ X] I have added necessary documentation (if applicable)
  • [X ] I have linked related issues using Fixes #issue_number or Closes #issue_number
  • [X ] I have rebased/merged with the latest main branch

🔍 Changes

Removed the use of the literal string "" as a placeholder for hidden NPC names.

Updated the name-handling logic to use Component.empty() when an NPC’s display name should be hidden.


🧪 How to Test

Create or load an NPC with an empty or hidden display name.

Join the server using a client older than 1.20.5

Open the tab list.

Before this fix: the NPC appears with the literal name "".

Now the the NPC does not appear in TAB as intended.

Perform same test on 1.20.5 + to confirm this still works.

…b list

instead of treating it as a hidden name. This patch replaces the placeholder
string with an empty Component, ensuring consistent name hiding across all
versions.
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