Skip to main content
This documentation is written for NameplateBuilder >= v4.260326.7 with API >= v2.2.0.

NameplateAPI - Static Methods

Segment Definition

Per-Entity Text

Component Access

Parameter Details

define() parameters: setText() parameters:

SegmentBuilder - Instance Methods

Returned by define(). Methods chain fluently and write through to the registry immediately - no build() call needed.

SegmentResolver - Functional Interface

NameplateData - Instance Methods

SegmentTarget - Enum

The target is a UI hint only. It does not restrict which entity types you can set text on or which entities a resolver runs for (use requires() for that).

Exceptions

Key Conventions

Segment IDs

  • Must be non-null and non-blank
  • Scoped to your plugin - two mods can both use "health" without conflict
  • Used as the key in NameplateData.setText() and NameplateData.getText()

Variant Key Suffixes (Manual Text Only)

  • Variant 0 (default) uses the base key: "health"
  • Variant 1 uses .1 suffix: "health.1"
  • Variant 2 uses .2 suffix: "health.2"
  • The aggregator falls back to the base key if a suffixed key is missing
  • Not needed when using resolvers - the variantIndex parameter handles this

Hidden Keys

  • Keys starting with _ (underscore) are hidden metadata
  • Stored in NameplateData but never shown in output or UI
  • Example: "_spawn_tick", "_phase"
  • See Advanced - Hidden Metadata Keys

Guides