Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
MythicHUD MythicHUD
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 4
    • Issues 4
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • MythicCraft
  • MythicHUDMythicHUD
  • Wiki
  • MythicHUD API

Last edited by Boy0000 Jun 09, 2025
Page history
This is an old version of this page. You can view the most recent version or browse the history.

MythicHUD API

MythicHUD features a rich API for enhanced integration and customization.

Dependency Information

GradleKts

repositories {
  maven("https://mvn.lumine.io/repository/maven-releases/")
  # For Snapshots
  #maven("https://mvn.lumine.io/repository/maven-snapshots/")
}

dependencies {
  compileOnly("io.limine.mythichud:api:$VERSION")
}

Maven

<dependency>
  <groupId>io.lumine.mythichud</groupId>
  <artifactId>api</artifactId>
  <version>$VERSION</version>
  <scope>provided</scope>
</dependency>

Events

MythicHUD contains a few events you can listen for.

HUDLayoutAddEvent

Fires whenever a layout is added to be shown to a player. Can be cancelled to make it not show to a player.

HUDLayoutRemoveEvent

Fires whenever a layout is removed from a player. Can be cancelled to make it still show to a player.

PlayerUpdateAttributeEvent

Fires whenever a player's attributes change

PlayerUpdateExperienceEvent

Fires whenever a player's experience points change

PlayerUpdateConsumableEvent

Fires whenever a player's health changes

HudHolder

A HudHolder is a class wrapped around a Player that handles updating, adding and removing various HudElements, amongst other things. You can get the HudHolder of a player by

MythicHUD.getInstance().holders().getPlayer(Player)
HudHolder.get(Player);

The HudHolder is primarily for modifying the HudLayouts for a Player.

public static void test(Player player) {
  HudHolder holder = MythicHUD.getInstance().holders().getPlayer(player);
  if (holder == null) return;
  
  holder.addLayout(hudLayout);
  holder.removeLayout(hudLayout);
  Optional<ActiveLayout> activeLayout = holder.getActiveLayout("hudlayout");
  if (activeLayout.isPresent()) {
  }
Clone repository
Home

Getting Started
What's New in MythicHUD?
Commands and Permissions
Configuration Reference

Layouts
Pop-Ups
HUD Components
  • Asset Layers
  • Assets
  • Listeners
  • Conditions
    • Effect
    • Gamemode
    • Placeholder
    • Progress
    • Logical Operators
Fonts

MythicHUD API
Compatibility
  • Migrating from v1 to v2
  • Supporting Multiple Client Versions
  • Crucible
  • Nexo
  • ItemsAdder
  • Modded Clients