content 05
Glyphs and HUD
Glyphs
A glyph is a PNG registered as a bitmap font provider. Files in glyphs/ and fonts/ are both
loaded. Each top-level key is a glyph id.
| Key | Type | Default | Notes |
|---|---|---|---|
character | one character | allocated | A private use character. Written as "" in YAML. When absent, the next free character from U+E010 upwards is assigned. |
texture | namespaced path | tessera:font/<id>.png | A missing namespace becomes tessera:, a missing .png is added. |
ascent | integer | 8 | Baseline offset in the font provider. |
height | integer | 8 | Rendered height. |
width | integer | 8 | Stored for layout. |
# plugins/Tessera/glyphs/default_glyphs.yml
ruby:
character: ""
texture: tessera:font/ruby.png
ascent: 8
height: 8
width: 8
Eight glyphs are registered before your files are read: tessera_badge, tessera_banner,
pause_banner, tessera_status_bar, ruby, heart, mana and top_banner, on characters U+E001
to U+E008.
Reusing one of those ids in your own file overrides it.
Writing a glyph in text
Both forms are replaced before MiniMessage parses the string:
:ruby: colon form
<glyph:ruby> tag form
Substitution happens in every string Tessera formats itself: item names and lore, HUD text, the top banner, GUI titles and welcome text. An unknown id is left as written.
In item names, lore, HUD text and the top banner, each glyph is drawn without text shadow. The client otherwise draws a dark copy of the image one pixel down and to the right.
Sizing a banner
The client draws a glyph with its top edge at text y + 7 - ascent and its bottom edge height
pixels lower. A glyph that works in chat can end up cut off elsewhere, so the three built-in banners
are sized for where they are used:
| Glyph | Ascent | Height | Used for |
|---|---|---|---|
tessera_banner | 11 | 16 | Item names in the GUIs. Fits the first tooltip line. |
pause_banner | 16 | 28 | Pause menu title, between the title slot and the first button. |
top_banner | 10 | 22 | Bossbar title. Starts at the top edge of the screen. |
Textures
Put your PNGs in plugins/Tessera/pack/assets/tessera/textures/font/. The pack generator writes the
font provider list into assets/minecraft/font/default.json and assets/tessera/font/default.json,
so glyphs work in normal chat and in your own font.
HUD
Every .yml file in hud/ is loaded. Each top-level key is one HUD element.
| Key | Type | Default | Notes |
|---|---|---|---|
display_text | MiniMessage | empty | text is accepted as a second spelling. |
permission | node | unset | Players without it skip this element. |
enabled_by_default | boolean | true | Stored on the element. |
update_interval | ticks | 2 | Stored on the element. The ticker itself runs every 2 ticks. |
# plugins/Tessera/hud/default_hud.yml
default_actionbar:
display_text: "<white>:tessera_badge:</white> <red>:heart: <health>/<max_health></red> <gold>Ping: <ping>ms</gold>"
enabled_by_default: true
update_interval: 2
Placeholders
| Placeholder | Value |
|---|---|
<player> | Player name |
<health> | Current health, rounded down |
<max_health> | Max health attribute, rounded down |
<food> | Food level |
<level> | Experience level |
<ping> | Ping in milliseconds |
<world> | World name |
<x>, <y>, <z> | Block coordinates |
PlaceholderAPI placeholders are not parsed in 2.0.0, even with the plugin installed.
One element at a time
The ticker walks the elements in load order and sends the first one the player has permission for,
then stops. Two elements without a permission key means the second never shows. Use permissions to
pick between them, and put the most specific element first.
Player toggle
/tessera hud toggles the actionbar for the player who runs it. The choice is stored in the player's
PersistentDataContainer under tessera:hud_enabled, so it survives relogs. The banner is stored the
same way under tessera:banner_enabled and is toggled from the settings GUI.
Top banner
The banner is a bossbar whose title is rendered exactly like a HUD element, which is how a wide glyph becomes a banner across the top of the screen.
hud:
top_banner:
enabled: false
title: "<white>:top_banner:</white>"
color: "BLUE"
hide_bar: true
style: "PROGRESS"
enabled is the server-wide switch and color is a bossbar color name. With hide_bar, the pack
replaces that color's bar sprites with transparent ones, so only the banner is visible. Bars of the
same color from other plugins disappear as well, so pick a color nothing else on the server uses.
style is not read in 2.0.0. The overlay is always PROGRESS.
The client blurs the whole HUD behind menus, so the top banner is not visible in the Escape menu. The pause banner below covers that.
Pause banner
hud:
pause_banner: true
The pack sets the menu.game string, the "Game Menu" title of the Escape menu, to the pause_banner
glyph in every client language, so every player sees the banner there regardless of their language.
Turning the option off removes the key again on the next reload.