Older Minecraft clients render the literal "<empty>" string in the ta… #179
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📋 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
Fixes #issue_numberorCloses #issue_numbermainbranch🔍 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.