setup() method, call NameplateAPI.describe() to tell the UI about each segment you plan to use.
What describe() Does
It registers UI metadata only. It does NOT create any ECS components or affect entities. It tells the NameplateBuilder UI:
“My mod has a segment calledDescribing is optional but highly recommended. Without it, the UI shows the raw segment ID instead of a display name.health, show it asHealth Bar, it’s for all entities, and it looks like67/67.”
The Three Overloads
1. Name Only
2. Name + Target
3. Name + Target + Example (Recommended)
SegmentTarget Values
| Target | UI Tag | Use When |
|---|---|---|
SegmentTarget.ALL | [All] | The segment applies to any entity (players, NPCs, etc.) |
SegmentTarget.PLAYERS | [Players] | The segment only makes sense on players (e.g. guild tag, rank) |
SegmentTarget.NPCS | [NPCs] | The segment only makes sense on NPCs (e.g. faction, mood, bounty) |
PLAYERS-targeted segment on an NPC at runtime. The UI just uses it to help players understand what each segment is for.
When to Call describe()
Always call describe() in your plugin’s setup() method, before registering any tick systems. This ensures the UI metadata is available as soon as players open /npb.