Skip to main content
Popups are temporary UI elements triggered by events. They’re configured in YAML files in the popups/ directory.

File Structure

Popup configuration files are located at:
  • plugins/BetterHud/popups/

Basic Popup Structure

entity-popup.yml
entity_health_popup:
  move:
    duration: 3
    pixel:
      x-equation: 0
      y-equation: 40*t
  push: true
  key-mapping: true
  triggers:
    1:
      class: entity_attack
  layouts:
    1:
      name: entity_health_image
      gui:
        x: 0
        y: 0
      pixel:
        x: 128
        y: 32
  duration: 20

Configuration Options

duration
integer
required
How long the popup displays in ticks (20 ticks = 1 second)
triggers
object
required
Events that trigger the popup
layouts
object
required
Layout components to display
move
object
Movement animation configuration
  • duration: Animation duration in seconds
  • pixel: Movement equations
push
boolean
default:"false"
Push other popups up when displayed
key-mapping
boolean
default:"false"
Track popups per entity/key

Examples

Damage Indicator

damage-popup.yml
damage_indicator:
  duration: 30
  move:
    duration: 1.5
    pixel:
      x-equation: 0
      y-equation: 30*t
  triggers:
    1:
      class: entity_attack
  layouts:
    1:
      name: damage_text
      gui:
        x: 50
        y: 40

Level Up Notification

levelup-popup.yml
levelup_popup:
  duration: 60
  push: true
  triggers:
    1:
      class: player_level_up
  layouts:
    1:
      name: levelup_banner
      gui:
        x: 50
        y: 30

See Also

Popup Concepts

Learn about popup architecture

Triggers

Configure event triggers

Animations

Create movement animations

Layouts

Configure layout components

Build docs developers (and LLMs) love