This documentation is for NameplateBuilder v4.260326.2 with API v2.0.0.
How It Works
Normally in Hytale, each entity has oneNameplate component. If two mods both try to set it, they overwrite each other. NameplateBuilder fixes this by letting each mod register named segments (like "health", "guild", "bounty"), and combining them into one nameplate per entity. Players get a UI to pick which segments they want to see, reorder them, and customize how they look.
Your job as a modder is two things:
- Define your segment - tell NameplateBuilder it exists (name, icon, example text)
- Give it a value - tell NameplateBuilder how to compute the text for each entity
Step 1 - Manifest Dependency
Add NameplateBuilder as a dependency in yourmanifest.json so it loads before your mod:
Step 2 - API Jar
Download the API jar from CurseForge, place it in yourlibs/ folder, and add it to your build.gradle:
Step 3 - Define Your Segment
CallNameplateAPI.define() in your plugin’s setup() method. This tells NameplateBuilder that your segment exists so it shows up in the player UI:
/npb player UI with:
"bounty"- a unique ID for your segment (only your mod uses this)"Bounty"- the display name players see in the UISegmentTarget.NPCS- a hint that this is for NPCs (can also beALLorPLAYERS)"$500"- example text shown as a preview in the UI
Step 4 - Provide a Value (Resolver)
Now you need to tell NameplateBuilder what text to show for each entity. You do this with a resolver - a function that receives an entity and returns the text to display. NameplateBuilder calls it automatically for every visible entity. Chain.resolver() directly onto your define() call:
null and the segment is skipped for that entity.
That’s it. No tick systems to write, no components to manage, no cleanup to handle. Your segment now works: players can add “Bounty” to their nameplate chain via /npb, and they’ll see $500 (or whatever the actual bounty is) above NPCs that have a BountyComponent.
A More Realistic Example
Here’s a complete plugin with two segments - one that reads health stats and one that reads a faction component:.requires(componentType)- An optimization. Tells NameplateBuilder to only call your resolver for entities that have this component in their archetype. Entities without it are skipped entirely..cacheTicks(100)- Another optimization. Caches the result for 100 ticks (~3 seconds) instead of recomputing every tick. Use this for values that don’t change often.
What About Manual Text?
The resolver pattern above covers most use cases - any time your segment’s value comes from an ECS component on the entity (health, stats, faction, level, tier, etc.). There is one scenario where resolvers don’t work: when the value doesn’t come from a component at all. For example, if an admin runs a chat command like/setbounty goblin 500 and you want to store that bounty externally (in a config or database, not as a component on the entity), there’s no component for the resolver to read.
For that case, you can push text directly:
define() in setup() the same way - you just skip the .resolver() part. See Manual Text for the full guide including tick system patterns.
Rule of thumb: If your data lives on the entity as a component, use a resolver. If it doesn’t, use manual text.
Next Steps
- Resolvers -
requires(),cacheTicks(), and format variant support - Manual Text -
setText(),clearText(), tick system patterns - Format Variants - Let players pick between display formats (e.g. “42/67” vs “63%”)
- Advanced - Hidden metadata keys, cleanup, and edge cases