Panels & Layout

How to structure HUDs with panels, lines, elements, anchors, conditions, and permissions.

Overview

A HUD is a named entry under huds with one or more panels. Each panel has an anchor, layout, offsets, and lines. A line is either a single text content string or a map of elements (for row-style multi-part lines).

huds
 └── main                    # HudDefinition
      β”œβ”€β”€ permission / condition
      └── panels
           └── top-bar       # PanelDefinition
                β”œβ”€β”€ anchor, layout, offsets, ...
                └── lines
                     └── info   # PanelLineDefinition
                          └── elements (optional)
                               └── player  # ElementDefinition

Anchors

anchor places the panel on the virtual GUI screen (480Γ—270 model used by shaders and the online editor):

AnchorPosition
TOP_LEFTTop-left corner
TOPTop center
TOP_RIGHTTop-right corner
LEFTMiddle left
CENTERScreen center
RIGHTMiddle right
BOTTOM_LEFTBottom-left corner
BOTTOMBottom center
BOTTOM_RIGHTBottom-right corner

Panels that share the same anchor are stacked with panel-spacing (global) and each panel’s own offsets.

Layout Modes

LayoutBehavior
ROWLines (or elements within a line) flow horizontally
COLUMNLines stack vertically

Panel Options

panels:
  sidebar:
    anchor: RIGHT
    layout: COLUMN
    offset-x: -5
    offset-y: 0
    layer: 0
    opacity: 1.0
    background: true
    padding: 4
    padding-y: 0
    gap: 0
    align: right
    line-spacing: 13
    permission: ""
    condition: null
    lines: {}
OptionTypeDefaultDescription
anchorEnumCENTERScreen anchor (see table above)
layoutEnumCOLUMNROW or COLUMN
offset-xInteger0Horizontal pixel offset from the anchor
offset-yInteger0Vertical pixel offset from the anchor
layerInteger0Draw order layer
opacityDouble1.0Panel opacity
backgroundBooleanfalseDraw a semi-transparent background behind lines
paddingInteger4Horizontal padding around content / background
padding-yInteger0Extra vertical padding for background
gapInteger2Gap between elements in a ROW line
alignString"left"Horizontal alignment: left, center, right
line-spacingInteger13Vertical spacing between lines in a column
permissionString""Permission required to see the panel
conditionObject / nullnullVisibility condition
linesMap{}Named lines

Legacy keys offsetx, offsety, and paddingy are still accepted and mapped to the hyphenated options.

Lines

Each entry under lines is a PanelLineDefinition.

Simple content line

lines:
  health:
    content: "<font:small><red>HP <white>%player_health%</font>"
    offset: 0
    update-interval: -1
    permission: ""
    condition: null

Multi-element line (ROW panels)

When elements is set, the line is composed of multiple pieces (typical for top bars):

lines:
  info:
    content: ""
    elements:
      player:
        content: "<font:small><white>%player_name%</font>"
        offset: 0
        update-interval: -1
        permission: ""
        condition: null
      coords:
        content: "<font:small><gray>%player_x% %player_y% %player_z%</font>"
OptionTypeDefaultDescription
contentString""MiniMessage + placeholders (ignored when elements is used for composition)
offsetInteger0Extra pixel offset for this line
update-intervalInteger-1Content refresh interval in ticks (-1 = global update-interval-ticks)
permissionString""Permission required for this line
conditionObject / nullnullVisibility condition
elementsMap / nullnullNamed elements for multi-part lines

Element options

OptionTypeDefaultDescription
contentString""Display text
offsetInteger0Extra spacing offset
update-intervalInteger-1Per-element refresh interval in ticks
permissionString""Permission required for this element
conditionObject / nullnullVisibility condition

Conditions

Conditions can be attached to a HUD, panel, line, or element. If the condition fails, that part is hidden.

condition:
  left: "%player_world%"
  operator: "=="
  right: "world"
FieldDescription
leftLeft value (literal or PlaceholderAPI string with %...%)
operatorComparison operator
rightRight value (literal or placeholders)

Operators

OperatorNumbersStrings
==EqualEqual
!=Not equalNot equal
<Less thanβ€”
>Greater thanβ€”
<=Less or equalβ€”
>=Greater or equalβ€”

Numeric comparison is used when both sides parse as numbers; otherwise string comparison applies (== / != only for non-numeric).

Examples

Show a VIP panel only for players with a custom placeholder flag:

vip-panel:
  anchor: LEFT
  permission: "server.vip"
  condition:
    left: "%player_has_permission_server.vip%"
    operator: "=="
    right: "yes"
  lines:
    title:
      content: "<font:small><gold>VIP ACTIVE</font>"

Hide a line in the nether:

coords:
  content: "<font:small><gray>%player_x% %player_y% %player_z%</font>"
  condition:
    left: "%player_world%"
    operator: "!="
    right: "world_nether"

Permissions Hierarchy

Visibility checks are layered:

  1. HUD permission / condition
  2. Panel permission / condition
  3. Line permission / condition
  4. Element permission / condition

Empty permission means no permission check at that level.

Coordinate Model

The plugin and online editor share a 480Γ—270 GUI coordinate model (1080p at GUI scale 4):

  • Panel offset-x / offset-y are pixels relative to the anchor
  • Background is drawn slightly above the text baseline (padding-aware)
  • Use /minehud debug in-game to print resolved line positions (also written to the server log)
  • The editor Debug checkbox shows the same pixel metrics

Practical Tips

  • Use <font:small> for dense status text
  • Set per-line update-interval for expensive placeholders (e.g. economy) and keep static text at the global interval
  • Prefer softreload after text-only edits; use full reload after adding panels/lines that change pack assets
  • Multiple HUDs under huds can target different permission groups or conditions