HUD System
Package: com.hypixel.hytale.server.core.entity.entities.player.hud
The HUD system manages on-screen displays that persist while playing. Every player has a HudManager that controls which components are visible.
| System | Description | Docs |
|---|---|---|
| Notifications | Toast popups with styles, icons, items | Notifications |
| Event Titles | Full-screen title/subtitle with fades | Event Titles |
| Kill Feed | PvP/PvE death announcements | Kill Feed |
| Custom Overlays | Server-built persistent HUD | Custom HUD |
Built-in Components
Section titled “Built-in Components”| Component | ID | Description |
|---|---|---|
Hotbar | 0 | Item hotbar |
StatusIcons | 1 | Status effect icons |
Reticle | 2 | Crosshair/reticle |
Chat | 3 | Chat window |
Requests | 4 | Pending requests |
Notifications | 5 | Toast notifications |
KillFeed | 6 | Kill/death feed |
InputBindings | 7 | Key binding hints |
PlayerList | 8 | Tab player list |
EventTitle | 9 | Large event titles |
Compass | 10 | Direction compass |
ObjectivePanel | 11 | Objective tracker |
PortalPanel | 12 | Portal status |
BuilderToolsLegend | 13 | Builder tools help |
Speedometer | 14 | Speed display |
UtilitySlotSelector | 15 | Utility slot picker |
BlockVariantSelector | 16 | Block variant picker |
BuilderToolsMaterialSlotSelector | 17 | Material slot picker |
Stamina | 18 | Stamina display |
AmmoIndicator | 19 | Ammunition counter |
Health | 20 | Health display |
Mana | 21 | Mana display |
Oxygen | 22 | Oxygen/breath display |
Sleep | 23 | Sleep overlay |
Show/Hide Components
Section titled “Show/Hide Components”See Player API for how to obtain a PlayerRef.
Player player = store.getComponent(ref, Player.getComponentType());PlayerRef playerRef = store.getComponent(ref, PlayerRef.getComponentType());HudManager hud = player.getHudManager();
// hide compasshud.hideHudComponents(playerRef, HudComponent.Compass);
// show multiple componentshud.showHudComponents(playerRef, HudComponent.Health, HudComponent.Hotbar);
// replace all visible components (hides everything else)hud.setVisibleHudComponents(playerRef, HudComponent.Hotbar, HudComponent.Health);
// get current visible setSet<HudComponent> visible = hud.getVisibleHudComponents();// reset visible components to defaults and remove custom HUDhud.resetHud(playerRef);
// reset all client UI state (sends ResetUserInterfaceState packet)hud.resetUserInterface(playerRef);HUD vs Pages
Section titled “HUD vs Pages”| Feature | HUD | Pages |
|---|---|---|
| Persists while playing | Yes | No |
| Blocks gameplay | No | Yes |
| Event handling | No | Full |
| Multiple active | Yes | One at a time |
Use HUD for persistent overlays (scores, timers, minimaps). Use custom pages for menus and dialogs that pause interaction.