A lightweight Java library for managing multiple custom HUDs (Heads-Up Displays) in Hytale server plugins.
HytaleMultipleHUD simplifies the management of multiple custom UI overlays on a single player. Instead of replacing the entire HUD each time you need to display a new interface, this library allows you to stack multiple HUDs and manage them individually with unique identifiers.
- 🎯 Multiple HUD Management - Display and manage multiple HUDs simultaneously on the same player
- 🏷️ Flexible Identification - Identify HUDs by class type or custom string identifiers
- 🔄 Easy Switching - Switch between HUDs without losing track of existing ones
- 🛡️ Thread-Safe - Uses concurrent data structures for safe multi-threaded operations
- 🪶 Lightweight - Minimal dependencies, focused solely on HUD management
import fr.flash303.multiplehud.MultipleHud;
import com.hypixel.hytale.server.core.entity.entities.Player;
import com.hypixel.hytale.server.core.entity.entities.player.hud.CustomUIHud;
import com.hypixel.hytale.server.core.universe.PlayerRef;
// Display a custom HUD with automatic identification
CustomUIHud myHud = new CustomUIHud(playerRef);
MultipleHud.displayCustomHud(player, playerRef, myHud);
// Display a custom HUD with a string identifier
MultipleHud.displayCustomHud(player, playerRef, "my-hud-id", myHud);
// Switch between multiple HUDs without losing them
MultipleHud.displayCustomHud(player, playerRef, secondaryHud);dependencies {
implementation 'com.github.Flash303:HytaleMultipleHUD:v1'
}Add JitPack to your repositories:
repositories {
maven { url 'https://jitpack.io' }
}<dependency>
<groupId>com.github.Flash303</groupId>
<artifactId>HytaleMultipleHUD</artifactId>
<version>v1</version>
</dependency>Add JitPack to your repositories:
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>The library works by wrapping multiple custom HUDs in a single HudWrapper that acts as a container:
- First Display: When you display a HUD for the first time, a wrapper is created and set as the active HUD
- Subsequent Displays: Additional HUDs are added to the wrapper's internal map with unique identifiers
- Active Hud: The wrapper maintains which HUD is currently active and renders accordingly
- Thread-Safe Storage: Uses
ConcurrentHashMapto safely manage multiple HUDs across threads
The library supports three ways to identify HUDs:
- Class-based (
HudClassIdentifier) - Uses the class name of the custom HUD - String-based (
HudIdIdentifier) - Uses a custom string identifier you provide - Custom (
HudIdentifier) - Implement your own identification logic
The library supports flexible HUD identification:
-
Class-based (Default) - HUDs are identified by their class name. Only one HUD per class type can be active simultaneously.
MultipleHud.displayCustomHud(player, playerRef, myHud); // Identified as: "MyCustomHud"
-
String-based - Use custom string identifiers to store multiple HUDs of the same class type.
MultipleHud.displayCustomHud(player, playerRef, "shop-tier-1", shopHud); MultipleHud.displayCustomHud(player, playerRef, "shop-tier-2", shopHud); // Both can coexist with different identifiers
// Display with automatic class-based identification
MultipleHud.displayCustomHud(Player player, PlayerRef playerRef, CustomUIHud customHud)
// Display with custom string identifier
MultipleHud.displayCustomHud(Player player, PlayerRef playerRef, String identifier, CustomUIHud customHud)
// Display with custom HudIdentifier
MultipleHud.displayCustomHud(Player player, PlayerRef playerRef, HudIdentifier identifier, CustomUIHud customHud)- Java 25+
- Hytale Server 2026.01.24-6e2d4fc36 or compatible
This project is authored by Flash303.
Contributions are welcome! Feel free to submit issues and pull requests.