Skip to main content
BetterHud provides seamless integration with Skript, allowing you to control HUDs, popups, and compass markers using simple scripts.

Requirements

  • Bukkit/Spigot/Paper server
  • Skript installed
  • BetterHud Bukkit plugin
Skript integration is only available on Bukkit-based platforms, not Velocity or Fabric.

Installation

  1. Download and install Skript from GitHub
  2. Install BetterHud Bukkit plugin
  3. Restart your server
  4. BetterHud will automatically detect Skript and enable integration

Compass Markers

Add and remove compass markers (waypoints) for players.

Add Marker

Add a compass marker at a specific location:
command /pointadd:
    trigger:
        # Basic marker
        point add location at 0, 0, 0 in world "world" named "spawn" to player
        
        # Marker with custom icon
        point add location at 10, 0, 0 in world "world" named "home" with icon "house" to player
        
        # Marker at player's location
        point add location at player's location named "my_marker" to player

Syntax

point add location at <x>, <y>, <z> in world "<world>" named "<name>" to <player>
point add location at <x>, <y>, <z> in world "<world>" named "<name>" with icon "<icon>" to <player>
point add location at <location> named "<name>" to <player>

Parameters

  • <x>, <y>, <z>: Coordinates of the marker
  • <world>: World name
  • <name>: Unique identifier for the marker
  • <icon>: (Optional) Custom icon name from your compass configuration
  • <player>: Target player

Remove Marker

Remove a compass marker by name:
command /pointremove:
    trigger:
        # Remove specific marker
        point remove "spawn" to player
        
        # Remove multiple markers
        point remove "home" to player
        point remove "shop" to player

Syntax

point remove "<name>" to <player>

Popups

Show custom popups with variables.

Show Popup

Display a popup to a player:
command /popup:
    trigger:
        # Simple popup
        show popup "damage_popup" to player
        
        # Popup with variables
        set {_vars::damage} to "15"
        set {_vars::target} to "Zombie"
        show popup "combat_popup" to player with variable of {_vars::*}

Syntax

show popup "<popup_name>" to <player>
show popup "<popup_name>" to <player> with variable of {<variables>::*}

Using Variables

Pass custom variables to popups:
command /damage:
    trigger:
        # Create variables
        set {_data::damage} to "25"
        set {_data::type} to "Critical Hit"
        set {_data::target} to "Skeleton"
        
        # Show popup with variables
        show popup "damage_indicator" to player with variable of {_data::*}
Access variables in your popup configuration:
damage_indicator:
  triggers:
    1:
      class: entity_attack
  layouts:
    1:
      name: damage_text
  # Variables passed from Skript
  text:
    - "<var:damage> <var:type>"
    - "vs <var:target>"

Complete Examples

Teleport System

Create a teleport system with compass markers:
command /sethome:
    trigger:
        set {home::%player%} to player's location
        point add location at player's location named "home" with icon "house" to player
        send "Home set!" to player

command /home:
    trigger:
        if {home::%player%} is set:
            teleport player to {home::%player%}
            send "Teleported home!" to player
        else:
            send "No home set! Use /sethome first." to player

command /delhome:
    trigger:
        delete {home::%player%}
        point remove "home" to player
        send "Home deleted!" to player

Quest System

Show quest markers and progress:
command /startquest <text>:
    permission: quests.start
    trigger:
        set {quest::%player%} to arg-1
        
        if arg-1 is "dragon":
            # Add quest marker
            point add location at 100, 64, 200 in world "world" named "quest_dragon" with icon "dragon" to player
            
            # Show quest start popup
            set {_vars::quest} to "Slay the Dragon"
            set {_vars::reward} to "1000 gold"
            show popup "quest_start" to player with variable of {_vars::*}
            
            send "Quest started: Slay the Dragon" to player

command /completequest:
    trigger:
        if {quest::%player%} is set:
            # Remove quest marker
            point remove "quest_dragon" to player
            
            # Show completion popup
            set {_vars::quest} to "Slay the Dragon"
            set {_vars::reward} to "1000 gold"
            show popup "quest_complete" to player with variable of {_vars::*}
            
            delete {quest::%player%}
            send "Quest completed!" to player

Combat System

Show damage indicators:
on damage:
    if attacker is a player:
        set {_vars::damage} to "%damage%"
        set {_vars::target} to "%victim%"
        
        # Check for critical hit
        if attacker is sprinting:
            set {_vars::type} to "CRITICAL"
        else:
            set {_vars::type} to "Normal"
        
        # Show damage popup
        show popup "damage_indicator" to attacker with variable of {_vars::*}

Random Event System

every 5 minutes:
    loop all players:
        # Random chance for event
        set {_rand} to random integer between 1 to 100
        
        if {_rand} <= 10:
            # Spawn treasure at random location
            set {_x} to random integer between -100 to 100
            set {_z} to random integer between -100 to 100
            set {_loc} to location at {_x}, 64, {_z} in world "world"
            
            # Add marker
            point add location at {_loc} named "treasure" with icon "treasure" to loop-player
            
            # Show notification
            set {_vars::type} to "Treasure"
            set {_vars::distance} to "%distance between loop-player and {_loc}%"
            show popup "event_notification" to loop-player with variable of {_vars::*}

Shop System

Mark shop locations:
command /shops:
    trigger:
        # Add multiple shop markers
        point add location at 50, 64, 50 in world "world" named "shop_weapons" with icon "sword" to player
        point add location at -30, 64, 80 in world "world" named "shop_armor" with icon "armor" to player
        point add location at 0, 64, -40 in world "world" named "shop_food" with icon "food" to player
        
        send "Shop locations marked on your compass!" to player

command /hideshops:
    trigger:
        # Remove all shop markers
        point remove "shop_weapons" to player
        point remove "shop_armor" to player  
        point remove "shop_food" to player
        
        send "Shop markers hidden!" to player

Death Marker

Mark where the player died:
on death of player:
    # Save death location
    set {death::%player%} to player's location
    
    # Add death marker
    point add location at player's location named "death" with icon "skull" to player
    
    # Show death popup
    set {_vars::cause} to "%damage cause%"
    show popup "death_screen" to player with variable of {_vars::*}

on respawn:
    # Keep death marker visible
    wait 1 tick
    send "Your death location is marked on your compass." to player

command /cleardeath:
    trigger:
        point remove "death" to player
        delete {death::%player%}
        send "Death marker cleared!" to player

Advanced Usage

Dynamic Popups

Create popups based on game state:
function showHealthWarning(p: player):
    if {_p}'s health < 6:
        set {_vars::health} to "%{_p}'s health%"
        set {_vars::max} to "%{_p}'s max health%"
        show popup "low_health_warning" to {_p} with variable of {_vars::*}

every 1 second:
    loop all players:
        showHealthWarning(loop-player)

Conditional Markers

Add markers based on conditions:
command /findnearestplayer:
    trigger:
        set {_nearest} to nearest player to player
        if {_nearest} is set:
            point add location at {_nearest}'s location named "nearest_player" with icon "player" to player
            send "Nearest player marked!" to player
            
            # Auto-remove after 30 seconds
            wait 30 seconds
            point remove "nearest_player" to player
command /notify:
    trigger:
        if {cooldown::%player%} is not set:
            show popup "notification" to player
            set {cooldown::%player%} to true
            
            wait 10 seconds
            delete {cooldown::%player%}
        else:
            send "Popup on cooldown!" to player

Best Practices

Performance

  1. Remove markers when no longer needed:
    point remove "marker_name" to player
    
  2. Avoid showing popups in high-frequency events:
    # Good - Limited frequency
    every 1 second:
        show popup "status" to player
    
    # Avoid - Too frequent
    on any movement:
        show popup "status" to player
    
  3. Use cooldowns for frequent popups:
    if difference between now and {lastPopup::%player%} > 5 seconds:
        show popup "event" to player
        set {lastPopup::%player%} to now
    

Organization

  1. Use descriptive marker names:
    # Good
    point add location at 0, 0, 0 in world "world" named "spawn_point" to player
    
    # Avoid
    point add location at 0, 0, 0 in world "world" named "p1" to player
    
  2. Group related functionality:
    # quest_system.sk
    command /startquest:
        # ...
    
    command /completequest:
        # ...
    
  3. Clean up data on player quit:
    on quit:
        delete {temp::%player%::*}
    

Troubleshooting

Marker Not Appearing

  1. Verify compass is configured and enabled
  2. Check marker name doesn’t conflict with existing markers
  3. Ensure world name is correct
  4. Verify player has compass HUD enabled
  1. Check popup name matches configuration
  2. Verify popup is defined in popup configuration files
  3. Check player has popups enabled
  4. Ensure no conflicting popups with same trigger

Variables Not Working

  1. Use list variables with ::* syntax:
    set {_vars::key} to "value"
    show popup "test" to player with variable of {_vars::*}
    
  2. Verify variable names match popup configuration
  3. Check variable values are strings

Next Steps

Popups

Configure custom popups

Compass

Set up compass system

Triggers

Understand popup triggers

Placeholders

Use placeholders in popups

Build docs developers (and LLMs) love