HUD Compatibility
GroupManager displays real-time group information on the player's HUD through integration with third-party HUD plugins.
Supported HUD Plugins
AutoMultiHud (by Buuz135)
GroupManager uses reflection to detect and integrate with AutoMultiHud. When available, group status is rendered as a HUD panel using the CSS selector #GroupMultiHUD.
AutoMultiHud intercepts all setCustomHud network packets and groups them by JAR source (via stack trace inspection). Each plugin that calls setCustomHud gets its own isolated "group" inside AutoMultiHud, allowing multiple plugins to display HUDs simultaneously without replacing each other.
MultipleHUD
Preferred HUD provider. GroupManager detects it at startup and uses it with highest priority. MultipleHUD manages HUD groups natively through its own API, avoiding the positioning conflicts that can occur when AutoMultiHud groups packets by JAR source.
Detection Order
- MultipleHUD is checked first — if available, it is always used.
- If not found, AutoMultiHud is detected (for compatibility and stale-state cleanup).
- InternalMultiHud acts as the fallback — the HUD works without any external plugin.
Detection happens once at plugin startup. No configuration is needed.
HUD Content
The group HUD panel displays:
| Element | Description |
|---|---|
| Group title | "Group" header with member count |
| Leader | Leader name highlighted |
| Members | All member names with online/offline indicators |
| Prefix/Suffix | Custom text before/after names (set via API by external plugins) |
| Health bars | Real-time health for each member |
| Energy bars | Real-time energy for each member |
| Mana bars | Real-time mana for each member |
The HUD updates automatically every 250ms using GroupTracker, which caches health, energy, mana, position, level, and XP for each group member.
Technical Details
GroupManager includes InternalMultiHud, which serves a dual purpose:
- Standalone mode: If no external HUD plugin is installed,
InternalMultiHudrenders the group HUD natively. The HUD always works out of the box. - MultipleHUD mode: When MultipleHUD is detected (highest priority), HUD calls are routed through MultipleHUD's API via reflection.
- AutoMultiHud fallback: When only AutoMultiHud is present,
InternalMultiHudensures all packets come from GroupManager's JAR, keeping a single AutoMultiHud group.
This means:
- No external HUD plugin is required — the group HUD works by default.
- When MultipleHUD is present, it takes priority and manages HUD groups natively.
- When only AutoMultiHud is present,
InternalMultiHudhandles compatibility automatically. - No HUD plugin JAR is needed at build time — all detection is via reflection.
How resumeHud Works Internally
When resumeHud() is called (and no MultipleHUD/AutoMultiHud is handling HUDs), GroupManager performs a full state cleanup before recreating the HUD:
- Removes the cached
InternalMultiHudfrom its internal map (forces a fresh instance). - If AutoMultiHud is present, clears the player's state (
playersWithMasterUiandhudMap). - Creates a new
InternalMultiHudand callsplayer.getHudManager().setCustomHud()— which sends a Set packet (not Update).
This guarantees that AutoMultiHud initializes Master0.ui from scratch, avoiding stale state from a previous HUD session.
This cleanup is handled entirely inside GroupManager. External plugins don't need to worry about it — just call resumeHud() and the HUD will be restored correctly.
CSS Customization
If you're customizing your server's UI, the group HUD element uses:
#GroupMultiHUD {
/* Your custom styles here */
}
API Control
External plugins can control the HUD per-player:
GroupService api = GroupManagerProvider.get();
// Hide HUD during a match
api.pauseHud(playerUuid);
// Restore HUD after match
api.resumeHud(playerUuid);
These methods are always safe to call, regardless of whether AutoMultiHud is installed. GroupManager handles AutoMultiHud detection internally — see below.
MultipleHUD / AutoMultiHud Compatibility
How It Works Internally
GroupManager detects MultipleHUD and AutoMultiHud at startup. When either is present, pauseHud() and resumeHud() become automatic no-ops — they return immediately without doing anything.
This is because both mods allow multiple plugins to display HUDs simultaneously — MultipleHUD via its native API, and AutoMultiHud by creating a separate group per plugin JAR. There's no need to hide one to show the other.
| Scenario | Without HUD mods | With MultipleHUD or AutoMultiHud |
|---|---|---|
pauseHud() called | Hides GroupHud (engine has single HUD slot) | No-op — both HUDs coexist |
resumeHud() called | Restores GroupHud from scratch | No-op — GroupHud was never hidden |
| Your plugin shows a HUD | Replaces GroupHud (single slot) | Both HUDs visible simultaneously |
What This Means For Your Plugin
You don't need to detect MultipleHUD or AutoMultiHud yourself. Just call pauseHud/resumeHud unconditionally — GroupManager handles the rest:
public void onActivityStart(Player player) {
// Always safe to call — no-op if MultipleHUD/AutoMultiHud is present
groupApi.pauseHud(player.getUuid());
// Show your activity HUD
showMyHud(player);
}
public void onActivityEnd(Player player) {
hideMyHud(player);
// Always safe to call — no-op if MultipleHUD/AutoMultiHud is present
groupApi.resumeHud(player.getUuid());
}
Querying AutoMultiHud Status (Optional)
If your plugin needs to know whether AutoMultiHud is present for its own logic (e.g., to decide how to lay out its own HUD panels), the API exposes:
boolean autoMultiHud = groupApi.isAutoMultiHudPresent();
This is purely informational — you do not need to check this before calling pauseHud/resumeHud.
Complete Example: Activity HUD Management
public class MyActivityHud {
private final GroupService groupApi;
/** Called when a player enters the activity */
public void onActivityStart(Player player) {
// Pause GroupHud (internally no-op if MultipleHUD/AutoMultiHud is present)
groupApi.pauseHud(player.getUuid());
// Show your activity HUD
showMyHud(player);
}
/** Called when a player exits the activity */
public void onActivityEnd(Player player) {
hideMyHud(player);
// Resume GroupHud (internally no-op if MultipleHUD/AutoMultiHud is present)
groupApi.resumeHud(player.getUuid());
}
/** Called when a player reconnects to an active activity */
public void onActivityReconnect(Player player) {
groupApi.pauseHud(player.getUuid());
showMyHud(player);
}
}
Just call pauseHud/resumeHud whenever your plugin needs to hide/restore the GroupHud. GroupManager handles MultipleHUD/AutoMultiHud compatibility internally — no detection code needed in your plugin.