BossBarOrderManager

public class BossBarOrderManager

Owns stable ordering and visibility for every non-dialogue boss bar created by EliteMobs.

The client stacks boss bars purely in the order their ADD packets arrive, so a bar that gets removed and re-added drops to the bottom of the stack and every bar below it shifts. To keep the stack deterministic, each bar shown through this manager carries a permanent numeric sort key (derive it from the owning boss UUID via sortKeyFor so it never changes for the lifetime of the boss). When a bar is shown, the manager re-sends it and every bar sorted after it, reproducing the sorted sequence on the client no matter when each bar appeared. Exclusive displays can suspend a player's bars without losing their current desired state.

Types

Link copied to clipboard
public class BossBarOrderManagerEvents implements Listener
Link copied to clipboard
public final class Suspension

Functions

Link copied to clipboard
public static void clearPlayer(Player player)
Link copied to clipboard
public static void discardSuspension(Player player, BossBarOrderManager.Suspension suspension)
Releases a terminal suspension without sending any bars back to the player.
Link copied to clipboard
public static void hide(Player player, BossBar bossBar)
Link copied to clipboard
public static void resumePlayer(Player player, BossBarOrderManager.Suspension suspension)
Releases one suspension; only the final live token restores current bars.
Link copied to clipboard
public static void show(Player player, BossBar bossBar)
Shows a bar whose relative order has no domain-specific key.
public static void show(Player player, BossBar bossBar, long sortKey)
Shows a bar to a player at its sorted position.
Link copied to clipboard
public static void shutdown()
Link copied to clipboard
public static long sortKeyFor(UUID owner)
Permanent numeric sort key for a bar owned by this UUID.
Link copied to clipboard
public static BossBarOrderManager.Suspension suspendPlayer(Player player)
Hides managed bars and returns an ownership token that must be released.